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.
You can modify the auth configuration in the config.json file