The Crypto Native Portal, an app that creates a mechanism to financially acknowledge the micro contributions of Open Source collaborators along with tools that promote effective governance.
Is your feature request related to a problem? Please describe.
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
Describe the solution you'd like
Process of authentication
Get the user nonce: /api/user/nonce/{address}
Sign and return to /api/auth/siwe
And SIWE should return a token
Use the token to authenticate the user /api/user/{address}
And you get the user informations
Then redirection to home page
Expected user Story
When the user is not authenticated
Then the value the user should be:
Description
Close #261
Is your feature request related to a problem? Please describe. A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
Describe the solution you'd like
Get the user nonce: /api/user/nonce/{address} Sign and return to /api/auth/siwe And SIWE should return a token Use the token to authenticate the user /api/user/{address} And you get the user informations Then redirection to home page
When the user is authenticated Then the value the user should be
When the user is authenticated and go to the login page Then the user should be redirected to the home page
When the user is not authenticated and go to another page than the login page Then the user should be redirected to the login page
When the user is authenticated and have and 401 error Then the user should be logout then redirected to the login page
When the logout app is called Then the value the user should be set to
When the user sign in Then the value of the user should be set to
How to know if the user is authenticated
When the auth token is not null or the fetch do not return a 401 error. Then the app consider the user as authenticated
When the auth token is null or the fetch return a 401 error. Then the app consider the user as not authenticated And the user should be logedout
Acceptance Criteria