RSSAmplifier

Jordi's journey to Full Stack Developer · Jun 18, 2025

Building with purpose 6.2: Retrieving the user from Clerk

0
Sign in to vote or save

This page did not load. You can still read it on the original site — the toolbar below keeps your place in the directory.

Having the long-lived token copied somewhere nearby, it's now time to retrieve the user from Clerk, but to do so, we need to make a few adjustments. From our index.ts, we need to modify the dotenv import and use import "dotenv/config" instead. Make s...

Having the long-lived token copied somewhere nearby, it's now time to retrieve the user from Clerk, but to do so, we need to make a few adjustments.

From our index.ts, we need to modify the dotenv import and use import "dotenv/config" instead. Make sure this import is before the Clerk imports. With this done, we can remove the dotenv.config(); and the second object we are passing to server.register() where we pass the clerkPlugin (we don’t need the keys now).

Next, go to Postman and paste the long-lived token into our Authorization tab (make sure you change the Auth Type to Bearer Token before pasting it).

We can now try the route, and if we did everything correctly, we should receive a 200 OK response and our user.

That's it for this part.

Salut, Jordi.

Check the repository HERE.

Read on jordi0lle.hashnode.dev

Comments

Nothing yet. Say the first thing.

    Sign in to join the conversation.