Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/charlesread/fastify-jwt-acl-auth-demo

fastify-jwt-webapp and fastify-acl-auth demo
https://github.com/charlesread/fastify-jwt-acl-auth-demo

Last synced: 13 days ago
JSON representation

fastify-jwt-webapp and fastify-acl-auth demo

Awesome Lists containing this project

README

        

# About

This is a demonstration of a "full-blown" stateless [_fastify_]()-based web application using [_fastify-jwt-webapp_]() (used for authentication), and [_fastify-acl-auth_]() (used for authorization).

Here we use auth0 as our IdP, and by setting the return values of _fastify-acl-auth_'s `allowedRoles` and `actualRoles` equal to one another we achieve a very impractical setup that whoever is logged-in is able to access an "admin" route.

```bash
npm i
node index.js
```