Back

[SOLVED] Access blocked error google OAuth

  • 0
  • Flutter
  • Accounts
Arth
10 Apr, 2023, 14:46

@Steven

TL;DR
The user had an access blocked error with Google OAuth. The solution was to delete the current session. They were able to log in without any problems afterward. There was also a suggestion to switch from HTTP to HTTPS and use the correct HTTPS port. Additionally, the user provided information about their reverse proxy settings and confirmed that they were using HTTPS. There was a discussion about setting up OAuth between Appwrite and the provider, and it was clarified that OAuth should only be set up between the provider and Appwrite, not the provider and mobile. The user also had questions about what to do with the app secret field in Appwrite. It was suggested
Arth
10 Apr, 2023, 14:48

apparently you should pass an empty string for app_secret, but I'm doubtful about if it there's any extra configuration needed

Faisal7
10 Apr, 2023, 15:00

i cant leave the app secret field empty

Faisal7
10 Apr, 2023, 15:00

in appwrite

Faisal7
10 Apr, 2023, 15:18

what should i do now?

Drake
10 Apr, 2023, 16:11

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

Faisal7
10 Apr, 2023, 16:24

yes exactly i also taught the same, that i must configure the OAuth between appwrite and provider.

Faisal7
10 Apr, 2023, 16:25

so which informations i set to the appwrite from google console. First i used the web credentials from google console it didnt work.

Drake
10 Apr, 2023, 16:28

in here i see the redirect uri says https://appwrite....

Drake
10 Apr, 2023, 16:28

but over here it's http://...

Drake
10 Apr, 2023, 16:28

are you using https for your endpoint in your code? do you have a reverse proxy in front of appwrite?

Faisal7
10 Apr, 2023, 16:31

yes i am using https and its running in a container in my synology nas with reverse proxy built in in my nas

Drake
10 Apr, 2023, 16:31

is the reverse proxy passing to appwrite via HTTPS?

Faisal7
10 Apr, 2023, 16:33

yes

Faisal7
10 Apr, 2023, 16:33

wait i make a screenshot of my reverse proxy setting for appwrite container

Faisal7
10 Apr, 2023, 16:36
Drake
10 Apr, 2023, 16:37

right there it says http 🧐

Would you please switch that to HTTPS and use the HTTPS port that appwrite is running on?

Faisal7
10 Apr, 2023, 16:43

ok i changed it

Faisal7
10 Apr, 2023, 16:44
Faisal7
10 Apr, 2023, 17:11

ooooh thats just amazing, thank you sooo much Steven. Now i am able to login without a problem.

Faisal7
10 Apr, 2023, 17:11

for logging out a user i just need to delete then all sessions?

Faisal7
10 Apr, 2023, 17:15

Now i can play arround a bit. I am ok with closing this. Thank you very much @Steven and all who has helped me with patient.

Drake
10 Apr, 2023, 17:30
Drake
10 Apr, 2023, 17:30

[SOLVED] Access blocked error google OAuth

Reply

Reply to this thread by joining our Discord

Reply on Discord

Need support?

Join our Discord

Get community support by joining our Discord server.

Join Discord

Get premium support

Join Appwrite Pro and get email support from our team.

Learn more