DEV Community

Discussion on: Asp Net Core - Rest API Authorization with JWT (Roles Vs Claims Vs Policy) - Step by Step

Collapse
 
manniealfaro profile image
Manuel

Hi Mohamad! VERY THANKS for this series! It is very usefull for me! But I've one doubt. I've evrything configured in my API, but how I can configure my client to send the tokens in the requests to the API? So once I'm logued in I can retrive any data from the API? Thanks a lot!

Collapse
 
gitredaamine profile image
GitRedaAmine

check if you have added the AllowAnyOrigin of your client app in your asp.net core project
// global cors policy
app.UseCors(x => x
.SetIsOriginAllowed(origin => true)
.AllowAnyMethod()
.AllowAnyHeader()
.AllowCredentials());