Skip to content
id0n

Runtime with Legation

Add customer sign-in to an application running on Runtime.

Who this is for: teams running a web app on Runtime who want Legation for their customers' sign-in. What you get: your Runtime application signs users in through its Legation environment.

Neither product requires the other. This guide connects them through your application's configuration.

Prerequisites

Register your application's origins

Register the URL of your Runtime application, any custom domains and your exact redirect URLs for the Legation environment. See Origins and redirect URLs.

Store the Legation endpoint as configuration

Add the endpoint as an environment variable on the Runtime application, rather than hard-coding it. Choose a variable name that suits your app.

Create the client from that variable

Create the Legation client with that value as baseURL. See Get started with Legation.

Redeploy and test

Redeploy or restart the Runtime application so it picks up the variable. Sign up a test user and check the session.

Common failures

SymptomFix
INVALID_ORIGIN after adding a custom domainRegister the new domain with id0n.
Client still points at the old endpointRestart the Runtime application after changing the variable.

On this page

Ask AI

Answers come from the published id0n docs, with links to their sources.