What is JWT (JSON Web Token), and how is it used in Angular?
- JWT is a compact, URL-safe token format that securely transmits information
between parties.
- Contains a payload with user info and claims, digitally signed.
- Angular apps use JWT to:
- Store authentication state.
- Send it with API requests to authorize access.
- Decode JWT to get user roles, expiry, etc.