i am getting this error when trying to login with google. I set up everything in my appwrite console as well as at the ggogle side in google developer console. Am i missing something?
#[SOLVED] Access blocked error google OAuth
49 messages · Page 1 of 1 (latest)
Hi, allow me to look into this
Hi, thank you
I think you've created credentials for webapp in google console but you're running flutter for mobile?
yes i am using flutter
yes it says that i must add the redirect url the same which i already added to the google console
i am using appwrite 1.2.0 by the way
is this the problem on configuring my google console or on appwrite ?
I think you used the appid of web app instead of ios app in appwrite project
not the same
and these look like configuration for browser instead of ios app
Im curious if it is possible to add multiple clientIds for different devices for the same oauth provider
@tall hazel 🤔
Not possible at the moment. I'd like us to support multiple instances of an oauth provider one day.
This only matters when a provider can have different orgs/tenants. For example, multiple companies can sign up for okta and you would need multiple okta oauth providers in Appwrite to support the multiple companies
yes i have used the web client id and secret but when i use the ios client id as app id in appwrite, whre do i get then app secret for ios? I dont see the secret key for ios in google console
i didnt get it it means i can just use any oauth provider for just ios, android, or web not all of them
I dont think if you should be able to use webapp's credentials for ios app
i am using flutter i taught when i set up the oauth for google in appwrite it works in ios,android and web. I may missing some knowledge can you give me information how it works and how basically can i use oauth for my flutter which i then sign in a user from different platforms to the same oauth provider
I dont know much flutter myself, but it seems like for ios apps there's no secret credential from gcp, and app secret is a requirement in appwrite settings
yes exactly i also didnt found app secret for ios in gcp, thats why i use the web credentials
@tall hazel
https://stackoverflow.com/questions/32071856/how-to-get-client-secret-from-google-developers-console-in-ios
I found this on stackoverflow
apparently you should pass an empty string for app_secret, but I'm doubtful about if it there's any extra configuration needed
what should i do now?
uhhh for Appwrite and OAuth, you should only be setting up OAuth between the provider and Appwrite and not provider and mobile. with the 1 configuration of Appwrite <> OAuth2 Provider, you can call account.createOAuth2Session() from mobile AND web
yes exactly i also taught the same, that i must configure the OAuth between appwrite and provider.
so which informations i set to the appwrite from google console. First i used the web credentials from google console it didnt work.
in here i see the redirect uri says https://appwrite....
but over here it's http://...
are you using https for your endpoint in your code? do you have a reverse proxy in front of appwrite?
yes i am using https and its running in a container in my synology nas with reverse proxy built in in my nas
is the reverse proxy passing to appwrite via HTTPS?
right there it says http 🧐
Would you please switch that to HTTPS and use the HTTPS port that appwrite is running on?
ooooh thats just amazing, thank you sooo much Steven. Now i am able to login without a problem.
for logging out a user i just need to delete then all sessions?
Now i can play arround a bit. I am ok with closing this. Thank you very much @tall hazel and all who has helped me with patient.
Ya, delete the current session. See https://appwrite.io/docs/client/account?sdk=flutter-default#accountDeleteSession