Rank 3: Container
So I have to create another form for filling in these details.??
Votes
1
Replies
24
Participants
Unknown
Messages
25
Rank 3: Container
So I have to create another form for filling in these details.??
Rank 3: Container
There are some websites that use Google data though
Moderator
Once the user logins with Google, you can get the data from Appwrite
Rank 3: Container
I want on get Google data on sign-up so I create user table with photo url, name, email etc from google
Moderator
You mean externally, and not in Appwrite, true?
Rank 3: Container
In appwrite
Moderator
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
Rank 3: Container
Just like in some websites you just sign in with Google and all other info is fetched from google acc
Rank 3: Container
How do you get name and email from google auth
Moderator
Appwrite gets it and creates an account
Moderator
You get it from the account created
Rank 3: Container
Does it also get the photourl
Moderator
Nope
Moderator
Unfortunately it doesn't because if I remember well, its a sensitive scope
Rank 3: Container
Lemme check the outh2 function and see how to fetch name and email so i can put it in the users table
Moderator
I do it this way:
Moderator
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
Rank 3: Container
Yes yes
Moderator
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)
Moderator
Also I recommend triggering it in async mode
Rank 3: Container
Same for apple oauth right.?
Moderator
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
Rank 3: Container
Lemme try this one. Thanks @Steven
Rank 3: Container
this is also my way to handle with this situation. Good luck