Skip to content

This repository works as a blueprint for Angular apps using Redux (ngrx) and authentication against a REST backend.

Notifications You must be signed in to change notification settings

d-koppenhagen/ng-auth-ngrx

Repository files navigation

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.

About

This repository works as a blueprint for Angular apps using Redux (ngrx) and authentication against a REST backend.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published