I am new to backend development I searched a lot for how to Implement logout but didn't find the way
When you use JWT, Logout have to be implement in front-end and fast-api has nothing to do with it.
Implement your refresh token in an put API.
so is it okay if u logged out u can still use ur token?
Yeah, with the suggested way from @Yeganloo the token would be still valid. if you want to make a real logout you have to create a token blacklist and check in your auth dependency if the token has been revoked.
Most helpful comment
Yeah, with the suggested way from @Yeganloo the token would be still valid. if you want to make a real logout you have to create a token blacklist and check in your auth dependency if the token has been revoked.