Skip to content
This repository has been archived by the owner on May 13, 2023. It is now read-only.

Google Login Error in Flutter mobile app #29

Closed
muhammadmateen027 opened this issue Jun 26, 2021 · 5 comments
Closed

Google Login Error in Flutter mobile app #29

muhammadmateen027 opened this issue Jun 26, 2021 · 5 comments
Labels
bug Something isn't working

Comments

@muhammadmateen027
Copy link

muhammadmateen027 commented Jun 26, 2021

Bug report

Google Login Error in Flutter mobile app

I have tried to log in using google ..signIn(provider: Provider.google), but it doesn't help at all. Webview pop-up doesn't appear even you can get the URL in print() method.

To Reproduce

Steps to reproduce the behavior:

  1. Setup google login as per your documentation
  2. Add button action in the app to login (I tried on physical device and simulator)
  3. No pop-up to show available accounts
  4. If you try to print URL from Result, it shows a URL like this https://[YOUR_APP_ID].supabase.co/auth/v1/authorize?provider=google

Expected behavior

The user should be able to view available google accounts and select.

Screenshots

No screenshot because nothing available on the page but I can share code snippets.
image

System information

  • OS: macOS, Android device. Android Simulator
  • Version of supabase-Flutter: supabase: ^0.0.1-dev.22
@muhammadmateen027 muhammadmateen027 added the bug Something isn't working label Jun 26, 2021
@nomanmurtaza786
Copy link

I am getting same problem. Anyone can share the flutter example, please.

@phamhieu
Copy link
Member

Hi @muhammadmateen027 @nomanmurtaza786

supabase-dart package just returns the authorize url for third party providers. You will need to manually trigger the browser tab to open this url.

you can take a look at the code example here

@phamhieu
Copy link
Member

phamhieu commented Jul 13, 2021

@muhammadmateen027 we release supabase_flutter to help with deeplink authentication on mobile. Give it a try and let me know if you are still facing problem with Google login https://pub.dev/packages/supabase_flutter

@Sahil-kachhap
Copy link

Sahil-kachhap commented Dec 7, 2021

@phamhieu I was trying to implement google authentication. As per the documentation, we require a google client id and a client secret. But after following those steps I am just getting a client id (no client secret, I have got a JSON file though but it too does not have anything sort of secrets). Seems like google client secrets have been deprecated for native applications. Can you suggest anything on how to proceed from here on now?
outh client

@dshukertjr
Copy link
Member

@Sahil-kachhap It appears that you have selected Android application in your case, but at the moment, you need to create a OAuth 2.0 Client IDs for web application even for native apps using Flutter. Don't worry, you will be able to sign users in form your iOS and Android apps even if you create a web application OAuth 2.0 Client ID. If you choose web application, it will give you all the necessary information including client secret!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

5 participants