Accessing clerk from ruby
backends dont matter
- tags
- ruby
- clerk
- sinatra
Contents
Lets see how we can interact with clerk from the backend, and what we'll need to do to both do batch jobs off of it, as well as how we could deploy a sinatra-based API that using JWT claims to process requests from statically build and deployed client side sites.
Talking to the clerk back end from ruby
|
|
Put your CLERK_SECRET_KEY
into .env
.
|
|
Adding clerk jwt support to sinatra
Start with https://github.com/wschenk/sinatra-ar-template so we are on the same page.
Add
|
|
Put your CLERK_SECRET_KEY
into .env
if you haven't already.
In app.rb
add cors support and the environment variables.
|
|
Replace the auth_check
in accounts.rb
to:
|
|
Calling the sinatra app from vanilla javascript
|
|
Previously
Next