Back

[SOLVED] google oauth getting credentials

  • 0
  • Users
  • Flutter
  • Databases
  • Accounts
frankenstein
9 Apr, 2023, 13:29

I want to setup google oauth sign up in my flutter app. Bascially i want to get the credentials like firstname, surname, email, number and save them in the users collection

TL;DR
Solution: To get credentials from Google using OAuth in a Flutter app and save them in the users collection, follow these steps: 1. Create an OAuth2 session using the desired provider (in this case, Google). 2. Retrieve the provider access token from Appwrite. 3. Use the provider access token to make an API call to Google and fetch the desired user data, such as first name, surname, email, and number. 4. Save the fetched data in the users collection.
frankenstein
11 Apr, 2023, 22:02

.?????

Drake
11 Apr, 2023, 22:09

After creating the OAuth2 Session, the session has a providerAccessToken that can be used to make API calls to the provider to fetch data.

See https://appwrite.io/docs/models/session

frankenstein
11 Apr, 2023, 22:11

Take an example google

frankenstein
11 Apr, 2023, 22:12

How do I get data

Drake
11 Apr, 2023, 23:09

The the provider access token from Appwrite and make an API call to google

frankenstein
18 Apr, 2023, 21:54

Anyone who knows how to make an api call to Google and get credentials.??

Drake
18 Apr, 2023, 22:55
frankenstein
20 Apr, 2023, 07:29

Thanks

Drake
20 Apr, 2023, 13:48

[SOLVED] google oauth getting credentials

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