Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[iOS] Universal link not working as redirect URI #987

Open
matjua17 opened this issue Jun 9, 2024 · 2 comments
Open

[iOS] Universal link not working as redirect URI #987

matjua17 opened this issue Jun 9, 2024 · 2 comments

Comments

@matjua17
Copy link

matjua17 commented Jun 9, 2024

Issue

Hi,

I am facing the problem that my https redirect URI is not working when using the normal authentication through the browser popup window. However, if I set the customBrowser to Safari, it works. This will open up the Safari browser in a external window. After swichting back to the popup window it works, but only for a limited time. After some time the Universal links stop working (Properly because the associated domains are cached somehow?). I have the feeling the apple app site association file is not loaded correctly, when the external browser is not opened once.

The use of the external (or default web browser) variant is not accepted by Apple App Review anymore, because of bad user experience.

If anyone could solve this problem, please contact me!

Thanks!

Environment

Keycloak

  • Platform that you're experiencing the issue on: iOS
  • Your react-native Version: e.g. 0.72.1
  • Your react-native-app-auth Version: e.g. 7.0.0
  • Are you using Expo?
    no
@carbonrobot
Copy link
Contributor

carbonrobot commented Jun 14, 2024

Can you tell me a little more about your setup, with an example code configuration and the provider you are using? We have started seeing similar issues in other frameworks.

RNAA uses AppAuth-iOS under the covers, which performs all the browser handling. AppAuth-iOS was updated a while ago to use the new ASWebAuthenticationSession and in-app browser tabs to avoid the problems with external browsers.

You could also try using [email protected] which uses a newer version of AppAuth-iOS.

@matjua17
Copy link
Author

matjua17 commented Jun 14, 2024

Hi @carbonrobot, i just found that: Custom Scheme URI safe in ASWebAuthenticationSession. We migrated from custom scheme URIs to Universal Links because they were unsafe. With the custom scheme URI we had no problems. But we will try to update the RNAA to the latest version and try it out there.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants