-
-
Notifications
You must be signed in to change notification settings - Fork 37
Support native auth on mobile devices #27
Comments
Thanks for opening this issue. This feature is heavily requested feature, and the team is well aware of it! Currently, we need this issue to be solved on the server side in order to implement this on the client side. |
Hello, the mentioned issue seems to be solved, any update on native auth on mobile devices?? |
@SushilGhorasaini1 we're waiting on supabase/auth-js#169 |
What makes gotrue-dart reliant on gotrue-js? It also looks like a PR has been successfully merged in already for that issue |
#61 still wont work unfortunately as |
Hmm. I'll take a look! |
This has to be changed in the backend and not in our end. Kang is informed & he created an issue for it in the backend repo, however this wont be fixed until after April afaik. |
Ah I see. Do you happen to have a link to the issue? |
we can generate our own nonce, like in https://firebase.flutter.dev/docs/auth/social#apple |
Yes, you can, but how backend going to verify this nonce from the jwt token if it doesn't exist within? Because that's how they do the verifying. Simply it wont work and fingercrossed it's not a 6 months of waiting. |
I made a PR to remove the requirement of nonce when it's not in the returned id_token |
@DanMossa would that fix the google requirement? |
It's kinda hard to tell if that's the only issue but I think it's the only thing stopping it right now. There's no nonce embedded in some JWT tokens, and so that PR makes it so you don't need to send a nonce if and only if there's no nonce in the JWT |
can confirm @DanMossa PR fixed the issue and now I can login with Google. |
@k0shk0sh could you provide more info on how you did that? |
Below did the trick for me :). You get onAuthenticated after successful signIn.
Same for apple signIn. Although I haven't tested it yet on iOS device, I bet it works. |
@k0shk0sh |
supabase/supabase-flutter#5 is already tracking that |
Feature request
Is your feature request related to a problem? Please describe.
Currently Supabase support only web oAuth which is mainly used for web applications and thus provide no UX to mobile users.
Describe the solution you'd like
Change how the SDK handles auth on mobile devices and this could be achieved by such code example (pseudo code)
consider having such an abstract class
then Supabase supported third party auth vendors could be implemented in such way
then simply we can let the user uses
Google
lib to authenticate the user on a mobile flow usingthen simply we could call a function in Supabase SDk that could handle this for example:
with that Supabase shall support native auth instead of web focused auth system.
Describe alternatives you've considered
done
on safari to return to the app.Additional context
I would definitely like to help here if me jumping in gonna make this FR implemented faster.
Cheers.
The text was updated successfully, but these errors were encountered: