cosierlabs / geomapper

Find fishing spots, get weather forecasts, and track marine fishes!
MIT License
0 stars 1 forks source link

Problem with Google signin #15

Open justdvl opened 1 month ago

justdvl commented 1 month ago

Hello, I tried running your app with expo, and when I tried sign in with google, I got:

Access blocked: Authorization Error

You can't sign in to this app because it doesn't comply with Google's OAuth 2.0 policy for keeping apps secure.

You can let the app developer know that this app doesn't comply with one or more Google validation rules. Learn more about this error If you are a developer of Luvever, see error details. Error 400: invalid_request

Error 400: invalid_request Request details: redirect_uri=exp://192.168.43.48:8081 flowName=GeneralOAuthFlow

kaizenics commented 1 month ago

Thank you for that feedback @justdvl !

Unfortunately, Google has very strict in third party authorization, so all authentications will be blocked and we can't control and fix that issue when it comes to third party authentication method. We will find a solution about Google Sign-In method. There might be a major changes in OAuth 2.0 Authentication by replacing Google Sign-In to Facebook Sign-In sooner if there is no way of fixing that issue.

I'll be leaving this issue open until the problem is fixed!

kaizenics commented 1 month ago

I am also recommending to Star the repository to subscribe the latest development updates of the application.

justdvl commented 1 month ago

OK I was hoping you have this figured out and you could help me. I think the issue with Google's "strict" authentication policy is that they don't allow redirect_url to be IP address, or exp:// address, only http and https. I couldn't figure out what to put to redirect_url to make sign up flow work. I even made a subdomain to redirect to exp address but didn't succeed.

I ultimately decided to abandon trying to make it work with Expo Go, and instead use recommended library by Expo, "@react-native-google-signin/google-signin", (which doesn't work with Expo Go, only native..). With that, it works just fine. Lastly I switched from auth by GCP to Firebase auth, as it's managed and offers functions to list users etc.

If you wanted a PR lmk.

kaizenics commented 1 month ago

Oh i see, You can make a PR so that I can review your code changes.

kaizenics commented 1 month ago

Did you try the other ways to log in like Email/Password authentication?

justdvl commented 1 month ago

Yes I have that as well, again using firebase/auth and firebase/app. I can add PR tomorrow.