mirror of
https://github.com/ArthurDanjou/website-old.git
synced 2026-01-26 09:50:32 +01:00
Add headers
This commit is contained in:
@@ -25,24 +25,28 @@ export default defineComponent({
|
|||||||
setup() {
|
setup() {
|
||||||
const { $axios } = useContext()
|
const { $axios } = useContext()
|
||||||
|
|
||||||
|
const headers = {
|
||||||
|
'Access-Control-Allow-Origin': '*',
|
||||||
|
'Content-Type': 'application/json'
|
||||||
|
}
|
||||||
|
|
||||||
const loginWithGithub = () => {
|
const loginWithGithub = () => {
|
||||||
return $axios.get('/auth/github',{
|
return $axios.get('/auth/github',{headers})
|
||||||
headers: {
|
.then((response) => {
|
||||||
'Access-Control-Allow-Origin': '*'
|
|
||||||
}
|
|
||||||
}).then((response) => {
|
|
||||||
console.log(response)
|
console.log(response)
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
const loginWithGoogle = () => {
|
const loginWithGoogle = () => {
|
||||||
return $axios.get('/auth/google').then((response) => {
|
return $axios.get('/auth/google', {headers})
|
||||||
|
.then((response) => {
|
||||||
console.log(response)
|
console.log(response)
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
const loginWithTwitter = () => {
|
const loginWithTwitter = () => {
|
||||||
return $axios.get('/auth/twitter').then((response) => {
|
return $axios.get('/auth/twitter', {headers})
|
||||||
|
.then((response) => {
|
||||||
console.log(response)
|
console.log(response)
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user