Back

[SOLVED] How to get Data from OAuth2 Providers?

  • 0
  • Flutter
  • Web
  • Accounts
Aarush Acharya
25 Jul, 2023, 21:09

yes i just did I understand

TL;DR
The user was trying to get data from OAuth2 providers and found a solution. They shared a link that might help in using the GitHub API. They realized that the value returned from the API was the UID of the provider. The user also mentioned having the provider access token and wanting to get the GitHub username using it. No further solution or guidance was provided in the thread.
Aarush Acharya
25 Jul, 2023, 21:10

so I have the provider access token now

Aarush Acharya
25 Jul, 2023, 21:10

and I want to get the github username using it

Aarush Acharya
25 Jul, 2023, 21:11

could you please guide me with the end point to which I would have to make the request to get it with the access token as the Authentication header

Drake
25 Jul, 2023, 21:12

Also, did you take a look at the rest of the data in the session object?

Aarush Acharya
25 Jul, 2023, 21:14

yes

Drake
25 Jul, 2023, 21:14

what's in providerUid?

Aarush Acharya
25 Jul, 2023, 21:15

it is the Uid of the provider

Aarush Acharya
25 Jul, 2023, 21:15

I gues

Drake
25 Jul, 2023, 21:15

did you actually look at the value?

Aarush Acharya
25 Jul, 2023, 21:16

I tried it out

Aarush Acharya
25 Jul, 2023, 21:16

in implementation initially i thought it might give me what i wanted but it returned a number

Aarush Acharya
25 Jul, 2023, 21:19

is it related to my github account ?

Drake
25 Jul, 2023, 21:22

anyways, you'll have to look up how to use the github api

Aarush Acharya
25 Jul, 2023, 21:22

could this somehow fetch me my username

Drake
25 Jul, 2023, 21:22

yes...

Aarush Acharya
25 Jul, 2023, 21:23

how

Drake
25 Jul, 2023, 21:23

look up how to use the github api

Aarush Acharya
25 Jul, 2023, 21:27

found this I guess this might help and would pass the auth token as the access token

Aarush Acharya
25 Jul, 2023, 21:27

though the appwrite part is resolved thanks a lot

Aarush Acharya
25 Jul, 2023, 21:33

Hey @Steven made it work thanks a lot

Aarush Acharya
25 Jul, 2023, 21:33

its working and I am getting the desired data

Drake
25 Jul, 2023, 21:34

[SOLVED] How to get Data from OAuth2 Providers?

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