Clerk logo

Clerk Docs

Ctrl + K
Go to clerkstage.dev
Check out a preview of our new docs.

Verifying a session

Protect Your Backend APIs

Go makes it really easy to create a simple HTTP server, and Clerk makes it really easy to authenticate any request. In the following example you can learn how to verify a session and retrieve the corresponding user.

.env
1

Using middleware

The Clerk SDK also provides a simple middleware that adds the active session to the request's context.

.env
1

Was this helpful?

Clerk © 2023