hey i am starting a small production company and i called a book stor and asked if we could film for an hour over there and they said they needed the name of the group insurance? so i was wondering…
Let’s start the code…..
4. create folder router and inside that create router.js.
5. fastify provides a decorator to decorate our routes.
6. Inside the router folder create authRouter.js.
Import the middleware and router in server.js as shown above.
Just start the server.js.
Let’s test our code………..
When we trigger our API with { userId, email, username } it created an access token and returned in the response.
Let’s validate our auth rout(“/api/v1/validateAccessToken”) with Access token.
We passed the access token as a “Bearer token” in Authorization headers.
Boom it got validated😀😀.
Thanks.
I grew up on a traditional family dairy farm. This was long before cell phones, so I was Mom and Dad’s messenger when they needed to communicate while Dad milked the cows at night. Nightly walks…
Joel Greenberg loved going to the casino. He had a high-pressure job as a Paramedic and he found that playing cards and the occasional slot machine were a great way to escape the daily life and death…
Social interactions with strangers used to make me really nervous. So much so that I was diagnosed with social anxiety by my therapist. I’d be at a loss for words, not even knowing how to strike up a…