-
-
Notifications
You must be signed in to change notification settings - Fork 183
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
How generate right credentials for Google Sign-in? #108
Comments
supabase/gotrue-dart#68 (comment) may be related |
@hmarat At the moment, Supabase supports web based OAuth login. The PR @bdlukaa has mentioned is one that brings Supabase closer to adding a fully native OAuth login, but there are some works to be done so it will take a little more time for it to land. In the mean while, you mentioned that you are not able to sign in even using the web version. Are you using the signInWithProvider() method to sign in? |
@dshukertjr I didn't try web, I need only mobile for now :) So I can't use native google sign in with normal consent screen for now? When it will be implemented and available? |
Sorry, I wasn't clear enough. It does work on mobile app, but it will take users to the web version of the consent screen, which might not be ideal for some situations. Give
Hopefully not so far away from now, but we do not have a definite timeline on this. |
@dshukertjr okay, thanks :) What about getting access token on frontend and write some cloud function on Supabase?)And then send it from frontend to the supabase, and with just rest api, get all google user data for sign in? |
@hmarat If your goal is to obtain user's Google profile information and not sign users in via Google account, then I think that will work! |
My goal here is Sign in user with google. Can I get user's data with cloud function and just create new user or generate some token if user already exists? |
@hmarat If you are trying to sign users in via their Google account, then the method I provided here will be the best option, but have you tried it?
With the cloud functions route, you might be able to get user information, but you won't be able to sign the user in via our auth system unfortunately. |
Okay @dshukertjr , thanks. I will try it and let you know ;) |
@dshukertjr and if I do in the way you told, what is your suggestion about redirecting back to the app with already signed in user?😀 |
I'm getting a similar issue when trying to login with Google locally. Since only web version is working, I cannot enter my local android simulator address (http://10.0.2.2:54321/auth/v1/callback) as authorized redirect uri when creating Google web credentials in Google Cloud console. I get: 'Invalid Redirect: must end with a public top-level domain (such as .com or .org).' How do I get around that? I'd like to do testing in my local supabase running in docker. PS: I tried putting url of my online instance but then I get this: |
@dshukertjr If I will go firebase, will I be able to migrate all data into supabase in the upcoming future, if authentication will be fully implemented for mobile? |
We are right around the corner at implementing native auth, which is what you are looking for it seems like!
Yup, we have Firebase to Supabase migration tool here. |
@dshukertjr Amazing, thanks! |
@dshukertjr any news? :) |
@hmarat Sorry, not quite yet. We will deliver the news once it has been implemented! |
@dshukertjr Okay, so what do you suggest ? :) I should release the app in july.
|
@hmarat If I were you, I would just go with Supabase now and build the social login with the current implementation. Currently, you can still sign people in using Google account from your native app by redirecting the users to the browser only for signing in. You can follow the example here on how you can do that. Eventually when true native sign in lands on Supabase, I would upgrade the supabase-flutter plugin to start using that. If you can release your app with just email + password auth to begin with, that might be a good option as well. If for some reason true native sign in is an absolute requirement, and you absolutely must release your app by July, then I would initially go with Firebase to play it safe. |
@dshukertjr Okay, thank you for the answer :) And lastly can you tell me the approximate time, when this will be ready ? :) |
@hmarat We are really hoping to get it shipped by August! |
Hey @dshukertjr :) We decided to wait your Auth implementation :) Do you think it will be done by August? |
Hey @hmarat, We are working hard, but the auth team of Supabase have a lot on their plates, so cannot promise anything for sure. With that being said, native auth is a very demanded feature, so we would love to bring it ASAP. BTW, what is the auth provider that you plan to use? Maybe we can prioritize those ones. |
I'm looking forward to this feature too, hoping to have this ASAP. I'm planning to use google and apple |
Google and Apple :) Thanks. Will be very happy to see it implemented :) |
@dshukertjr any news about the progress? :) |
There will be updates posted on this issue #5 when there is one. |
In my flutter project which is for both Android and iOS, I want to implement authentication with Google. Supabase wants from me the Client ID and Client secret. When I go to the Google Cloud Platform and try to generate an OAuth Client ID, it asks from me the project type(Web, Android, iOS).
Provider.Google
in supabase, it in the same moment returns null data.p.s. Even consent screen is not opening
The text was updated successfully, but these errors were encountered: