Admin
this is the endpoint that takes the auth code, requests an access token, and then creates an appwrite session: https://github.com/appwrite/appwrite/blob/master/app/controllers/api/account.php#L376-L400
Votes
0
Replies
24
Participants
Unknown
Messages
25
Admin
this is the endpoint that takes the auth code, requests an access token, and then creates an appwrite session: https://github.com/appwrite/appwrite/blob/master/app/controllers/api/account.php#L376-L400
Admin
did you get a chance to try it out? 🧐
Rank 1: Thread
not yet, will find some time though my php skills are not the greatest 😄
Admin
Oh I was just suggesting to use the API, not write any php code
Rank 1: Thread
oh, how dumb of me, lol
[SOLVED] Device authorization flow (social auth)
Rank 1: Thread
did more research and managed an attempt to test the request but
Rank 1: Thread
it says the provider is not enabled 🤔
Rank 1: Thread
am i missing something?
Admin
how did you make the request?
Either the OAuth2 provider in Appwrite isn't enabled or the project ID is incorrect
Rank 1: Thread
i ... found the issue
Rank 1: Thread
the github link is to the wrong function 😂
Rank 1: Thread
Admin
huh?
Rank 1: Thread
the request you linked had no projectId param
Rank 1: Thread
the above has it
Rank 1: Thread
was my bad there 😂
Admin
oh, sorry. you can send it as a query string like the one you linked does
Rank 1: Thread
yes it works, i just assumed there was no need for projectid (dumb of me)
Admin
it works as in you can exchange the device token for an appwrite oauth2 session?
Rank 1: Thread
haven't got to test with actual session only mockup
Admin
ah okay
Rank 1: Thread
im a bit squeezed between deadlines so i can only put like 5-10 mins
Rank 1: Thread
😦
Admin
Ugh....I couldn't get Google sign in to return an id token, but as I was testing, I noticed a serverAuthCode property. Maybe that can be passed to Appwrite to create the oauth2 session 🧐