C
C#4mo ago
Dex

Issue with verifying jwt toke in front end

So i am developing a full stack website and for authorization authentication i am using jwt token. Issue i am facing is that [Authorize] is not working. I am able to generate jwt token in session but i am unable to pass it ( i think). I tested the api using swagger. If i use swagger it works but in swagger i have to copy paste the token. I am having with imlpementing it in front end where it automatically takes the token which is generated.
2 Replies
JakenVeina
JakenVeina4mo ago
if you're able to call the API with a manually-supplied token, it sounds like either the token isn't being attached to the requests from your frontend code, or the token getting generated is invalid logs should reveal which alternatively, just have a look at the requests in DevTools that should basically be your first-step for ANY server/client issues
Dex
DexOP4mo ago
how do i attach token to the request from front end code ? i am using simple views
Want results from more Discord servers?
Add your server