Giter Site home page Giter Site logo

sys64738 / ng-authentication-demo Goto Github PK

View Code? Open in Web Editor NEW

This project forked from usergalileo/ng-authentication-demo

0.0 0.0 0.0 139 KB

Demonstration of 2 different ways to achieve Authentication in an SPA with a back-end, for instructional purposes.

JavaScript 5.01% TypeScript 93.65% CSS 0.28% HTML 1.06%

ng-authentication-demo's Introduction

๐Ÿ”‘ Angular Authentication (demo)

Demonstration of 2 different ways to achieve Authentication in an SPA with a back-end, for instructional purposes.

It contains 2 modules: AuthCookiesModule (standard Cookie-based authentication) and AuthTokensModule (a-la OAuth, no cookies, just access token and refresh token w/ rotation).

In AppModule, change the value of tokensOrCookies to load either of these 2 modules.

This project does not use OAuth/OIDC to connect with an Authorization Server. The token strategy is a custom solution inspired by OAuth but it can be less secure.

At least make sure that your server absolutely implements Refresh Token Rotation and Reuse Detection!

Do you need a backend for testing?

For instructional purposes I've made multiple demos with Node/Express, feel free to use either of these, they should both work out of the box with this project:

  • Use this server if you want to test the Cookie strategy.
  • Use this server if you want to test the Tokens strategy.

This project was generated with Angular CLI version 12.0.4.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.