Skip to content

AlexAegis/auth

Repository files navigation

Angular Authentication Tools

Latest NPM Version CI Codacy Badge codecov FOSSA Status

See the individual packages for more information

For information on how to use it, visit the link above!

{
  "@aegis-auth/jwt": "^17.0.0"
}

Handles common JWT use-cases, like adding the access token to requests and automatically refreshing it when needed.

It consists of a JwtModule with two configurable Interceptors, a LoginGuard which can also refresh on navigation, and a helper service to access your parsed and typed tokens.

It also provides a way to handle cases where a refresh cannot happen (For example: both token expired) with a redirection (As thats the most common recovery method) or a completely custom function for more advanced use-cases. It does so both on http requests and on navigation where the LoginGuard is utilized (And is enabled)

Requirements

Node

Use the latest LTS version

Cypress

To run Cypress e2e tests on a WSL2 Ubuntu instance install the following dependencies:

apt install -y xvfb libgtk-3-0 libgbm-dev

Angular

Compatibility Matrix