expo: After upgrading the expo-auth-session to 4, an error occurs when calling authUrl with startAsync.
Minimal reproducible example
https://github.com/DevYuns/expo-auth-session-bug
Summary
I implemented a supabase auth login with startAsync. And it work well on ios, android, and web in expo-auth-session@3.8.0, expo@47.0.3.
But an error occurred only on IOS after upgrade to expo@48.0.0, expo-auth-session@4.0.3 like below.
If I removed redirected_to from url, then I cannot back to app after authentication.
Environment
expo-env-info 1.0.5 environment info: System: OS: macOS 12.5 Shell: 5.8.1 - /bin/zsh Binaries: Node: 16.13.1 - ~/.nvm/versions/node/v16.13.1/bin/node Yarn: 1.22.17 - ~/.nvm/versions/node/v16.13.1/bin/yarn npm: 8.1.2 - ~/.nvm/versions/node/v16.13.1/bin/npm Watchman: 2022.11.14.00 - /opt/homebrew/bin/watchman Managers: CocoaPods: 1.11.3 - /opt/homebrew/bin/pod SDKs: iOS SDK: Platforms: DriverKit 22.2, iOS 16.2, macOS 13.1, tvOS 16.1, watchOS 9.1 Android SDK: API Levels: 28, 29, 30, 31, 32, 33 Build Tools: 28.0.3, 29.0.2, 30.0.2, 30.0.3, 31.0.0, 33.0.0 System Images: android-30 | Google APIs Intel x86 Atom, android-31 | Google APIs ARM 64 v8a, android-31 | Google Play ARM 64 v8a, android-33 | Google Play ARM 64 v8a IDEs: Android Studio: 2021.3 AI-213.7172.25.2113.9123335 Xcode: 14.2/14C18 - /usr/bin/xcodebuild npmPackages: expo: ~48.0.4 => 48.0.4 react: 18.2.0 => 18.2.0 react-dom: 18.2.0 => 18.2.0 react-native: 0.71.3 => 0.71.3 react-native-web: ^0.18.12 => 0.18.12 npmGlobalPackages: eas-cli: 0.52.0 expo-cli: 6.3.1 Expo Workflow: managed
About this issue
- Original URL
- State: open
- Created a year ago
- Reactions: 21
- Comments: 29 (6 by maintainers)
I have run into a similar issue but using google login in Expo Go:
I got this error in the console: WARN The useProxy option is deprecated and will be removed in a future release, for more information check https://expo.fyi/auth-proxy-migration.
But we do not call useProxy in our code.
I have tried both with and without
redirectUrispecified.“expo-auth-session”: “^4.0.3”, expo 48.0.4
This worked fine with expo 47
Ive read it and don’t think it helps. It says that it’s deprecated in 48, not that the functionality is removed.
Also removing support for logging in using Google in expo go is quite a big loss of functionality. It would be great if expo could reconsider this decision.
exact same issue for me, ValidationError: “redirect uri” is not allowed. “client id” is not allowed. “response type” is not allowed. “state” is not allowed. “scope” is not allowed
It appears that this issue is limited to iOS devices. I have tested it on Expo 47 and 48 and noticed the only difference is in the URL. Here are the URLs I copied from Safari:
Expo 47 (working): https://auth.expo.io/@xxxx/xxxx/start?authUrl=https%3A%2F%2Fxxxx.supabase.co%2Fauth%2Fv1%2Fauthorize%3Fprovider%3Dgoogle%26redirect_to%3Dexp%3A%2F%2F192.168.0.106%3A19000%2F--%2Fauth%2Fcallback&returnUrl=exp%3A%2F%2F192.168.0.106%3A19000%2F--%2Fauth%2Fcallback
Expo 48 (not working): https://auth.expo.io/@xxxx/xxxx/start?authUrl=https://xxxx.supabase.co/auth/v1/authorize?provider=google&redirect_to=exp://192.168.0.106:19000/--/auth/callback&returnUrl=exp://192.168.0.106:19000/--/auth/callback
When opening these links on Windows, I noticed different payload requests, as shown in this image:
So far, I have not found a working workaround. It seems that the issue is related to the encoding being removed and the browser taking the authUrl parameters for the auth.expo.io URL instead.
Same issue, any advice is appreciated
I have the same issue. Has anyone found a solution?
Thank you for filing this issue! This comment acknowledges we believe this may be a bug and there’s enough information to investigate it. However, we can’t promise any sort of timeline for resolution. We prioritize issues based on severity, breadth of impact, and alignment with our roadmap. If you’d like to help move it more quickly, you can continue to investigate it more deeply and/or you can open a pull request that fixes the cause.
It is happening to everyone. For the good of the repo mantainers try not commenting “me too” that isn’t helpful at all for the team and other members. That said I solved the same issue migrating to an AuthRequest object and it works exactly the same. Here is an example:
I had the same problem. It appears that a change was made in Expo Go where Google Login does not work.
https://github.com/expo/fyi/blob/main/auth-proxy-migration.md
Well I just followed the article and created a development build on Android and it seems to work fine.
https://github.com/expo/fyi/blob/main/auth-proxy-migration.md