Skip to content

clerk/m2m-example

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Clerk M2M Tokens Example

A simple example of how to use M2M tokens with Clerk, using express.

Running the example

  • Head to the Clerk dashboard, to machine config
  • Create two machines, called Machine A and Machine B. Make sure that the access scopes for Machine A include Machine B and vice versa. It should look something like this.
  • Create a .env file in the /machine-a and /machine-b folders in this repo with cp machine-a/.env.sample machine-a/.env && cp machine-b/.env.sample machine-b/.env
  • Add the machine secrets from your Clerk dashboard into the .env files
  • Run npm start to start the servers for machines A and B
  • In your browser, open http://localhost:3000/send to trigger machine A to send a request to machine B. You should see a response with a verified token.

About

Example for how to create and verify m2m tokens with Clerk

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published