Auth

In noonjs, authentication is based on JWT and includes login, register, logout, and refresh methods. When a user logs in or registers, they receive an access token and a refresh token. If the request comes from a browser, the refresh token is stored in an HTTP-only cookie; otherwise, both tokens are returned in JSON.

{
  "access": "eyJhbGciOiJIUzI1NiI...",
  "refresh": "eyJhbGciOiJIUzI1Ni..."
}

This is for demo purposes only and should be adjusted based on your application's security requirements.

Info

You can modify the auth configuration in the config.json file

Edit this page on Github
© 2025 kav3.com. Crafted with and dedication.