Skip to content

Latest commit

 

History

History
21 lines (15 loc) · 1.35 KB

README.md

File metadata and controls

21 lines (15 loc) · 1.35 KB

Authentication in Angular with NGRX

Want to use this project?

  1. Fork/Clone/Download
  2. Install dependencies - npm install
  3. Check the value for apiUrl in src/environments/environment.prod.ts and src/environments/environment.ts (depending on prod / dev environment and probably adjust it
  4. Run the development server - npm start

You will need to also spin up a back-end with the following routes:

URL HTTP Verb Action Request Data Response Data
http://localhost:8080/register POST Register a new user
http://localhost:8080/login POST Log a user in { email: string, password: string } { expires: number, token: string, user: { email: string }}
http://localhost:8080/api/v1/example GET Get some example data some JSON object

The returned token expiration will be checked against the current date. If the token is already expired, the backend should return an error.

Backend

For trying out you can use the This example backend.