Using fastify-jwt along with Auth0
See original GitHub issueHello,
I have used fastify-jwt in the past where my servers were in charge of issuing JWT tokens, etc. However, I am now trying to use Auth0 as the authority. I want to use Fastify as my server and verify tokens sent from clients and devices that have previously authenticate using Auth0 directly.
My question/request is how is this achieved using fastify-jwt
? I have seen several other node packages but all based on the premise of using Express. I don’t want to use Express and want to have everything working the “Fastify” way. Would it be possible to provide a working repo that uses RS256 and allow us to mark up our endpoints using preValidation: [fastify.authenticate]
?
Thanks in advanced!
Issue Analytics
- State:
- Created 4 years ago
- Reactions:1
- Comments:10 (7 by maintainers)
Top Results From Across the Web
How to Add Authentication to Your Fastify REST API Using ...
Use Node.js, Fastify, and Auth0 to protect your REST API with OAuth 2.0 ... For access tokens, we're going to use JSON Web...
Read more >@fastify/jwt - npm
Start using @fastify/jwt in your project by running `npm i @fastify/jwt`. ... HS256 or RS256 JWT tokens, you can use fastify-auth0-verify, ...
Read more >How to Use Node.js, Fastify and Auth0 to protect REST API
JWT is a standard method for creating JSON-based access tokens. ... Inside the workflow engine, I install fastify-auth0-verify using the standard npm ...
Read more >Fastify authentication strategy - Daily.dev
The fastify-auth module is a Fastify plugin that provided a utility to handle authentication in routes without adding overhead. It gives us a ......
Read more >fastify-jwt-webapp - NPM Package Overview - Socket.dev
Being "logged-in" is achieved by passing along the JWT along with each request, as is typical with APIs (via the Authorization header). fastify- ......
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
We are working on a new module at NearForm to automate some of this! Il 19 nov 2019, 23:01 +0100, Manuel Spigolon notifications@github.com, ha scritto:
I have a working example with validates Auth0 issued tokens, both HS256 and RS256 using fastify-jwt.
The dependencies are:
It uses environment variable for configuration, here’s the required ones:
And here’s the code: