How to access authenticated social token


I’ve followed this tutorial Build and Secure an Electron App - OpenID, OAuth, Node.js, and Express

I’ve used GitHub to authenticate, and now I want to explore the logged-in user GitHub activity, but in order to do that I need the GitHub token.

Is it correct to call Auth0 Management API to do it?
I’ve tried with the resources server, but even adding the permission required to get the current user identity, I am not able to.

Is there a better way to get the github token of the logged user?

Bear in mind that this is my ever experience with authentication.

Thank you

Hi @Tedsky,

Welcome to the Auth0 Community!

I understand that you are looking to get an authenticated user’s Github Activity.

Firstly, to get the GitHub Token, please see Authorizing OAuth Apps - GitHub Docs to learn more on how to get your app to access the GitHub API with the user’s access token.

In this case, you will not need to use the Auth0 Management API.

Please let me know if you have any further questions.

Thank you.

Hello @rueben.tiow,

Thank you for your answer.
Help me understand, this means that, after I log in using auth0, in order to access GitHub API, I need to authenticate with Github separately?

Thank you

Hi @Tedsky,

Thank you for your response.

That will not be necessary. Once the user authenticates onto your application using Github, the access token granted can be used to call the API of the third-party provider that issued them.

Please see Identity Provider Access Tokens to learn more.

Thank you.

1 Like

Hello @rueben.tiow

I will take a look and let you know,

thank you for your patience!