JWT Storage - Microsoft Q&A (2024)

Hi @Ronald Rex ,

You need to do just like this:Setup the .Net 5.0 Web API Project.

  1. Configure JWT Authentication
  2. Generate JWT Token.
  3. Validate JWT Token using CustomMiddleware and Custom Authorize Attribute.
  4. Testing the Endpoint (API) with Swagger.

A JWT needs to be stored in a safe place inside the user's browser. Any way,you shouldn't store a JWT in local storage (or session storage).If you store it in a LocalStorage/SessionStorage then it can be easily grabbed by an XSS attack.

If the answer is helpful, please click "Accept Answer" and upvote it.

Note: Please follow the steps in our  documentation  to enable e-mail notifications if you want to receive the related email notification for this thread.
Best regards,
Yijing Sun

JWT Storage - Microsoft Q&A (2024)
Top Articles
Latest Posts
Article information

Author: Stevie Stamm

Last Updated:

Views: 6180

Rating: 5 / 5 (80 voted)

Reviews: 95% of readers found this page helpful

Author information

Name: Stevie Stamm

Birthday: 1996-06-22

Address: Apt. 419 4200 Sipes Estate, East Delmerview, WY 05617

Phone: +342332224300

Job: Future Advertising Analyst

Hobby: Leather crafting, Puzzles, Leather crafting, scrapbook, Urban exploration, Cabaret, Skateboarding

Introduction: My name is Stevie Stamm, I am a colorful, sparkling, splendid, vast, open, hilarious, tender person who loves writing and wants to share my knowledge and understanding with you.