-
Notifications
You must be signed in to change notification settings - Fork 345
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
Redirect URL #117
Comments
@erniukas86 did you find any workaround for it? I am following this migration doc auth-proxy-migration, but most of the OAuth providers do not allow non http/https urls to be set as redirectUri. |
is there a solution to the problem ? same problem, can't get redirected. |
same issue |
@EvanBacon Is there a better solution to this issue yet? I saw you mentioned setting up your own proxy server and then redirect to the custom uri scheme, but that seems like a lot of work for something that could simply be done by using universal links. The reason these providers are blocking uri schemes is simply because it's not safe and you can't verify that the app that is handling the uri scheme is the actual owner of the link. I've tried using universal links as a solution to this, since these links require domain verification via apple-site-association/assetlinks, but this solution only works on Android, not on iOS for some reason. Do you have any idea why universal links do not work with |
For anyone running into this (only on iOS for me), I implemented a workaround. The problem seems to be that iOS doesn't dismiss the modal by itself when using a https link due to universal links not being handled internally, since iOS 17.4 Apple provided an api for universal link callbacks: Not sure if this is an expo issue or just an iOS framework issue. My custom workaround for now is to just attach a listener in case of ios and dismiss the modal myself when the link is called. useEffect(() => {
// In case of using a universal link for the callback, we need to listen to the url event and do stuff manually on ios...
// See: https://github.com/expo/fyi/issues/117
let listener: EmitterSubscription | undefined;
if (
Platform.OS === 'ios' &&
!isNullOrEmpty(endpoint?.openIdConnect?.callbackOverride)
) {
listener = Linking.addEventListener('url', event => {
const { codeVerifier, redirectUri, clientId } = request!;
const params = getUrlParams(event.url);
const code = params.get('code');
if (
event.url?.startsWith(endpoint?.openIdConnect?.callbackOverride!) &&
!isNullOrEmpty(codeVerifier) &&
!isNullOrEmpty(redirectUri) &&
!isNullOrEmpty(clientId) &&
!isNullOrEmpty(code)
) {
dismiss();
authenticateWithOpenId(code, codeVerifier, redirectUri, clientId);
}
});
}
return () => {
listener?.remove();
};
}, [request, endpoint?.openIdConnect?.callbackOverride]); |
How can I set this format to Google redirect URIs?
scheme://expo-development-client/?url=manifestUrl
Because. only HTTP and HTTPS allowed
The text was updated successfully, but these errors were encountered: