Oauth access token found in commit

I’m trying to use Github GraphQL API on my javascript App, but when i pass the token in post header, commit the change and push to remote. The access token gets revoked. How can i fix this? Thank you

1 Like

@AlexOkoro101

Welcome to GitHub Community

You should not commit your Access token in your repo it will get revoked. Have a look at the blog page. Since you are using Javascript application you can set your access token as an environment variable and then access that variable in your application. This would be more helpful as you can have different set of tokens for different environments like (dev,staging,prod)

5 Likes