Hi, I’ve been trying to update the logged user’s user.name from my react app, and I keep getting the following response"
{
(...)
status: 400
type: "cors"
}
The authentication works correctly using the wrapper, my app settings have been set to allow “http://localhost:3000” for all application URIs, and this is my code for updating the user.name:
const { getAccessTokenSilently } = useAuth0()
const token = await getAccessTokenSilently({
audience: <AUDIENCE>,
scope: 'update:users'
})
const body = { name: "New Name" }
const headers = {
Authorization: `Bearer ${token}`,
'Content-Type': 'application/json'
}
const response = await fetch("https://<DOMAIN>/api/v2/users/<USER_ID>", {
method: 'PATCH', body, headers,
})
Can anyone please help me with this?
Thanks in advance! ![]()