-
Notifications
You must be signed in to change notification settings - Fork 0
Authentication
This App uses JWT (JSON Web Tokens) for Authentication. When an initial login request is made to the server, if valid, it should return a response which contains a Bearer token as a token
attribute on the response body.
The response from a valid login request should also have a user object in the response which contains at least the name
and email
of the user that was just logged in. This is used for displaying the user's name in the app and for getting a gravatar image for them.
Whenever a valid GET response is issued from the server, it should contain a fresh token in it. The application expects to digest a new token and save it to the store whenever a valid response is returned. By default the time that a token is valid for is 30 days but by ensuring that a new token is returned on each valid response, the user will avoid being accidentally logged out 30 days from the first time they logged in. It will also ensure that a user doesn't remain inactive and in a valid session for more than 30 days.
Once the User has logged in, they will be redirected to the admin Dashboard, or to the admin page that they were trying to reach, prior to logging in. (ex. they were trying to access /admin/users without being logged in. They will therefore be redirected to the login page and after login, will be redirected to /admin/users)