haithamabass / WebApi_CleanArchitecture

An implementation of Clean Architecture for ASP.NET Core WebAPI secured with JWT
26 stars 12 forks source link

refresh token format #1

Open piyushjangid11111 opened 1 year ago

piyushjangid11111 commented 1 year ago

cannot authorize refresh token . i will get error 401 Unauthorized . invalid bearer token . convert your refresh token in jwt bearer format

haithamabass commented 1 year ago

can you please explain more about the issue you faced to help you?

piyushjangid11111 commented 12 months ago

can you please explain more about the issue you faced to help you?

i am able to use my jwt token to authorize controller but when i use refresh token it gives error that refresh token is not in bearer format please convert refresh token also in bearer format so i can use it

haithamabass commented 12 months ago

did you use the GenerateRefreshToken method at (Infrastructure/Identity/Services/AuthResponseService.cs) line 86?

it's used in the SignUp method to provide the new user with a RefreshToken and in the Login method if the RefreshToken that the user has is not active, therefore you are logged out automatically and then get error 401 Unauthorized, so you have to log in again