Back

how to do Oauth with Google

  • 0
  • Accounts
  • Web
Ajay
3 Apr, 2023, 13:55

As I am trying to do Oauth it is throwing error

TL;DR
The user is struggling with implementing Google OAuth on their project. They need to enable the OAuth client in the Google API console and configure it on the Google side. They should obtain the app ID and secret and input them into the Appwrite console when enabling Google OAuth. They may need to create a new project ID if they deleted all resources from Appwrite. The user also mentions that the documentation has changed and they are receiving an error when sending an ID. The user shares some code for a delete function and mentions that they are using React as the front end. They mention that the user access is blocked by Google and ask for help with the
Arth
3 Apr, 2023, 14:00

share code

joeyouss
3 Apr, 2023, 14:08

Hey, can you please show the error ?

Ajay
3 Apr, 2023, 14:08
Ajay
3 Apr, 2023, 14:08

this is the code for Google oauth

Arth
3 Apr, 2023, 14:08

what's the error you're getting?

Ajay
3 Apr, 2023, 14:09

Doing with react as front end

Ajay
3 Apr, 2023, 14:09

User access blocked by Google

Arth
3 Apr, 2023, 14:11

can you elaborate

Ajay
3 Apr, 2023, 14:13

const deleteasync = async (id) =>{ console.log(id) const response = await databases.deleteDocument("6427c6d20464df58bf36","6427c6dcd6bc73a91b81","id") response.then( function (response){ console.log(response) }, function (error){ console.log(error) } ) window.location.reload() }

Ajay
3 Apr, 2023, 14:13

This as well when I sending id it showing document id not found

Ajay
3 Apr, 2023, 14:14

It's the write code bcoz documentation has changed a lot

Arth
3 Apr, 2023, 14:14

then it probably means the document doesn't exist 😅

Arth
3 Apr, 2023, 14:15

I thought you were having error from google oauth?

Ajay
3 Apr, 2023, 14:17

That too

Ajay
3 Apr, 2023, 14:18

I will once again implement it will show properly

Ajay
3 Apr, 2023, 14:18

Is that delete one is correct

Ajay
3 Apr, 2023, 14:19

I have implemented it properly I have to create a new project id for that yesterday i deleted all the resources from appwrite

Vineet
3 Apr, 2023, 15:53

@Ajay I hope you've enable the oauth client in google api console. You need to configure it first on google's side , get the app id and secret. You feed this into the appwrite console when you enable google oauth

Ajay
3 Apr, 2023, 15:54

Ok I will try on this

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