So I have to create another form for filling in these details.??
There are some websites that use Google data though
Once the user logins with Google, you can get the data from Appwrite
I want on get Google data on sign-up so I create user table with photo url, name, email etc from google
You mean externally, and not in Appwrite, true?
In appwrite
Then the solution is without any doubts the one I suggested you: after the user logins, you get the name, email, etc with a function and create a new document in a collection with such data
Just like in some websites you just sign in with Google and all other info is fetched from google acc
How do you get name and email from google auth
Appwrite gets it and creates an account
You get it from the account created
Does it also get the photourl
Nope
Unfortunately it doesn't because if I remember well, its a sensitive scope
Lemme check the outh2 function and see how to fetch name and email so i can put it in the users table
I do it this way:
- User clicks login with Google button
- If the Auth flow is correct, the function is triggered from client side
- In the function I get the user that triggered the function and I create with such data a new document
It will not duplicate data if you set document ID as user ID, since it it's an user that logins again, it will throw an error of document with an existing ID
Yes yes
It's possible to do it too with appwrite account creation action, but I prefer that way š (Mainly because in old appwrite versions oAuth didn't trigger that)
Also I recommend triggering it in async mode
Same for apple oauth right.?
Yes, same for all oAuth and even email registering
After creating an oauth session, fetch the session. It should have an access token from the oauth provider. You can try using that access token to make API calls to the provider and fetch other things like profile picture
Lemme try this one. Thanks @Steven
this is also my way to handle with this situation. Good luck
Recommended threads
- Weird permission failure
when creating an account I use following methods: ``` Future<void> register(String email, String password, String username) async { final user = await accoun...
- Flutter Android oAuth is no more working
I currently don't get the oAuth login to work in flutter android. it works on ios and on web. but when try to use it on Android, i get to the point where the ca...
- I'm experiencing a critical bug on Appwr...
Hey <@870607367597850624> team / support š I'm experiencing a critical bug on Appwrite Cloud that's blocking my production Flutter app. I've already filed GitH...