Answer the question
In order to leave comments, you need to log in
Why does GitHub Token become obsolete after push?
async fetchRepos({commit, state, dispatch}, payload) {
commit('startFetchRepos', this.state.users.perPage)
const headers = {
"Authorization": `Token ${tokenGitHub} `
}
try {
let response = await axios.get(payload.reposUrl, {
"method": "GET",
"headers": headers
})
let userRepos = {
id: payload.id,
repos: response.data
}
commit('successFetchRepos', userRepos)
} catch (e) {
commit('failureFetchRepos', e.message)
}
},
Answer the question
In order to leave comments, you need to log in
Link from github support
Keeping GitHub OAuth tokens safe
While making your source code available in a public GitHub repository is awesome, it's important to be sure you don't accidentally commit your passwords, secrets, or anything else that other people shouldn't know.
Starting today you can commit more confidently, knowing that we will email you if you push one of your OAuth Access Tokens to any public repository with a git push command. As an extra bonus, we'll also revoke your token so it can't be used to perform any unauthorized actions on your behalf.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question