© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
C#C
C#•3y ago•
24 replies
S-IERRA

❔ JWT Storage location

Hi I'd like to ask where JWTs should be stored, my backend returns a JWT through the API and also sets an http-only cookie, but I'm not sure what to do with this from the front end as ASP requires an Authorization header and http only cookies can't be accessed from the front-end any ideas?

This is for most part what I do
        NumixAuthenticated jwtToken = _authenticatorService.GenerateToken(jwtUser);
        string jwtTokenJson = JsonSerializer.Serialize(jwtToken, JsonHelper.JsonSerializerOptions);
        
        var options = new CookieOptions
        {
            HttpOnly = true, 
        };
    
        Response.Cookies.Append("Numix", jwtTokenJson, options);

        return Ok(jwtTokenJson);
        NumixAuthenticated jwtToken = _authenticatorService.GenerateToken(jwtUser);
        string jwtTokenJson = JsonSerializer.Serialize(jwtToken, JsonHelper.JsonSerializerOptions);
        
        var options = new CookieOptions
        {
            HttpOnly = true, 
        };
    
        Response.Cookies.Append("Numix", jwtTokenJson, options);

        return Ok(jwtTokenJson);
C# banner
C#Join
We are a programming server aimed at coders discussing everything related to C# (CSharp) and .NET.
61,871Members
Resources

Similar Threads

Was this page helpful?
Recent Announcements

Similar Threads

Jwt
C#CC# / help
10mo ago
✅ jwt token
C#CC# / help
14mo ago
JWT tutorials.
C#CC# / help
2y ago
✅ JWT question
C#CC# / help
2y ago