-
-
Notifications
You must be signed in to change notification settings - Fork 38
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
[Bug]: 400: OAuth state parameter missing #841
Comments
Is there a reason, you are using |
Also this method isn't supposed to be used directly, this is why there is only a |
Just tried with
But same error '400: OAuth state parameter missing' happens. Also I would expect this function to return the result of the sign in request. Not throw various errors and potentially crash the whole app. A failed sign in request is not really that critical that the whole app needs to be shutdown, in my opinion at least. Any idea what this could be? Also tried including a 'state' parameter with an UUID appended to the URL, but to no avail. It's not self-hosted. Just a regular Supabase project with Azure authentication setup. The iOS equivalent app (with Supabase Swift SDK) does work so this is why im looking into the Android SDK code. |
The
supabase-kt/Auth/src/commonMain/kotlin/io/github/jan/supabase/auth/Auth.kt Lines 129 to 132 in 0694b70
Callbacks are generally rarely used in this library.
If Azure OAuth works on iOS, that shouldn't be an issue? Can you share the URLs opened in the Browser for Android and iOS? Or everything after |
For iOS its a bit different since it's a multiplatform app that also supports MacOS. The webview there opens this url:
and the After successful authorisation inside the iOS webview an authorisation code is returned by the webview callback which is then used to make an API call and get an access_token and id_token from the Azure API. The id_token is then used with the Supabase Swift SDK and calls:
Should I modify the Android code to this? I was hoping for a more plug and play solution. |
No, OAuth with deeplinks should be fine, just to verify, you followed this guide? |
General Info
Version(s)
3.0.3
Kotlin Target(s) and their respective versions
Android 10 and up
What happened? (include your code)
This opens the external default browser app, but I'm getting this error:
400: OAuth state parameter missing
in the Supabase log. I double checked all the values (client id, secret, redirect uri). They are all correct. We also have a native iOS app that uses the Supabase-swift SDK and connects to the same Supabase project without issue. Is this a known issue for Android? Would also be nice if there was anonError
callback in this function. In the SDK code I'm seeing an error is just thrown.Edit: Maybe due to Azure requiring OAuth 2.0? See issue here: https://github.com/orgs/supabase/discussions/2961#discussioncomment-8267427
Steps To Reproduce (optional)
No response
Relevant log output (optional)
The text was updated successfully, but these errors were encountered: