Generating Auto-Login URLs

Step 1: Generate an Org API Key

Click the "Administration" page in the top right

Go to the "Api Keys" tab, click "Create Key" and copy down this token for later

Creating temporary login tokens

The GraphQL api for this call is as follows:

mutation createLoginToken(email: String!, name: String, orgRole: OrgRole): String!

You can call the graphql api at /graphql using your new org api token as a bearer token. If the specific user doesn't exist, a new one will be created. orgRole and name will be ignored if the user already exists, and are only used for new user creation.

example using curl:

curl --location --request POST '<>' \\
--header 'Authorization: Bearer 6031f199750bae31a120e4b2bd008dbdfe3ccba5b8827a0b35df9d9a5b071e55d3b8d0800b608a55b30cfebe1a70073f' \\
--header 'Content-Type: application/json' \\
--data-raw '{"query":"mutation CreateLoginToken {\\n createLoginToken(email: \\"[email protected]\\", name: \\"Auto Jim\\", orgRole: MEMBER)\\n}","variables":{}}'

This will return a new token which can be used to generate the URL. This token is valid for 60 seconds only.

Constructing the auto-login url

Using the token returned, you can now create a url that automatically logs in a user and optionally redirects them to something.