Auth0 Home Blog Docs

Get GitHub token for user



I want to use the Hosted Lock page, and have a user log in via GitHub. I’ve got that working.

The part that isn’t working is where the user has a GitHub token stored against their user profile that I can use to perform operations on their behalf.

How do I have the Hosted Lock page receive a GitHub token and add it to the user record?


I believe that these two documents can point you in the right direction:

Then, you should be able to use the Github access token under user.identities[0].access_token.

Note this advice may be out of date. Originally answered by @abhishek.hingnikar in old forums:


I’m having this exact problem.

Is there any way to actually do this? I’m using swift on iOS and desperately trying to get a token with any other scope than “openid profile”. I’ve read all your documentation, and tried all your examples. None of it work. None of it.

This still returns a “openid profile” scoped token:

            .scope("openid profile read:user_idp_tokens")
            .start {