I am creating an application using React-Native and an asp.net core 6 API. I have registered both applications on Azure. When making a request from my Client Application for an access token, the request succeeds with a valid JWT according too jwt.io. However, I am recieving an error from my API that the token's signature is invalid. FYI I am also using version 2 of the token endpoints and I am logging in through a emulate android device. Not sure where to go from here.
Client Code
const retrieveWorkouts = (accessToken:string) => {
fetch(`${API_URL}/api/workout`,
{
method: 'GET',
headers: {
Authorization: `Bearer ${accessToken}`,
"Content-Type": "application/json"
}
})
.then(response => {
console.log(response)
if(response.ok) {
return response.json()
}
})
.then(data => {
setWorkouts([...data])})
.catch(error => {
console.log(error)
});
}
