Are there any standard approaches to verifying the...
# support-questions-legacy
w
Are there any standard approaches to verifying the user in .NET?
r
Hey @willb you can use any JWT lib to verify in .NET
w
Yeah was wondering if anyone had any suggestions of libraries to use. I'm assuming something using the JWKS endpoint is probably best? I've found https://github.com/NetDevPack/Security.JwtExtensions
r
Yup. Jwks enpoint use is the way to go.
w
@rp_st Is there any reason why I am getting a 404 on my JWKS endpoint?
Upgrading to latest version, it seems to just hang
r
I’m not sure what api you are querying. Could you give more details please?
w
@rp_st It was a super weird issue, couldn't load dashboard or anything in my API. Created a new SuperTokens account and connected to a different core and it works
r
hmm. That's odd
anyway, if the error comes again, please let us know
w
Got it working and roles loading from the supertokens JWT 🙂
Just one issue, when I make a request to my .NET API from my Vue app I seem to get a 401, when I make a request from Swagger it seems to work.
The sAccessToken cookie doesn't seem to be included when I call from my Vue app
Which is weird, because it is somehow included in Swagger on a different port
r
What’s the api domain for your .net backend and what’s the value of apiDomain set on the frontend?
w
.NET backend: http://localhost:5179 Vue frontend: http://localhost:3000 ST backend: http://localhost:8080 Frontend appInfo:
Copy code
appInfo: {
    apiDomain: "http://localhost:8080",
    apiBasePath: "/auth",
    appName: "App",
},
r
You might want to get the access token on the frontend and then add that as an authorisation bearer token to the request to your .NET backend
Cause the interception is only applied to the apiDomain
Network interception*
w
What seems so weird is how the token exists in Swagger which is on the 5179 port?
If I use a reverse proxy and have both on port 8080, will it then load from the cookie correctly?
r
Yes.
w
I'll try that, thanks 🙂
Forgot to say, that worked. Thank you!
15 Views