Add headers

This commit is contained in:
2021-07-04 17:15:56 +02:00
parent 639b0d9728
commit 09369c6231

View File

@@ -25,24 +25,28 @@ export default defineComponent({
setup() {
const { $axios } = useContext()
const headers = {
'Access-Control-Allow-Origin': '*',
'Content-Type': 'application/json'
}
const loginWithGithub = () => {
return $axios.get('/auth/github',{
headers: {
'Access-Control-Allow-Origin': '*'
}
}).then((response) => {
return $axios.get('/auth/github',{headers})
.then((response) => {
console.log(response)
})
}
const loginWithGoogle = () => {
return $axios.get('/auth/google').then((response) => {
return $axios.get('/auth/google', {headers})
.then((response) => {
console.log(response)
})
}
const loginWithTwitter = () => {
return $axios.get('/auth/twitter').then((response) => {
return $axios.get('/auth/twitter', {headers})
.then((response) => {
console.log(response)
})
}