I need to get users by calling the Auth0 API, but it doesnt work though,
Here is my code
getAllUsers () {
const url = 'https://ian.auth0.com/api/v2/users'
const fucks = `Bearer ${getAccessToken()}`
console.log(fucks, 'fucks is fucks')
const headers = {
headers: {
'Authorization': `Bearer ${getAccessToken()}`,
// 'Access-Control-Allow-Origin': '*',
//'Content-Type': 'application/json'
}
}
this.axios.get(url, {
withCredentials: true,
params: {
q: 'email.raw:"ian@yahoo.com"',
search_engine: 'v2'
},
//crossdomain: true,
headers
})
.then((response) => {
console.log(response, 'is response')
})
.catch((err) => {
console.log(err.toString(), 'err to string')
})
}
Already added
http://localhost:8081
In CORS section in my Auth0 settings
The access tokens is correct. Any other Ideas for this? Already tried Chrome Extention for temporary fix, but still doesnt work. Any Idea?
Here is the error
Response to preflight request doesn't pass access control check: No 'Access-Control-