Skip to Content

Rexplore ID for developers

Let people sign in to your app with Rexplore ID, a standard OpenID Connect provider with PKCE, rotating refresh tokens and a public JWKS.

Rexplore ID is an OpenID Connect provider. Any OIDC or OAuth 2.0 client library can use it: your app redirects the browser to Rexplore ID, the user signs in, and your app exchanges the returned code for tokens. Your app never handles passwords.

Discovery

Issuerhttps://auth.rexplore.ai
OpenID configurationhttps://auth.rexplore.ai/.well-known/openid-configuration
OAuth server metadatahttps://auth.rexplore.ai/.well-known/oauth-authorization-server
JWKShttps://auth.rexplore.ai/.well-known/jwks.json (also at /api/auth/jwks)

Configure your library with the issuer and let it read the discovery document; the endpoints below are listed for reference.

Endpoints

EndpointURL
Authorizationhttps://auth.rexplore.ai/api/auth/oauth2/authorize
Tokenhttps://auth.rexplore.ai/api/auth/oauth2/token
UserInfohttps://auth.rexplore.ai/api/auth/oauth2/userinfo
Revocationhttps://auth.rexplore.ai/api/auth/oauth2/revoke
Introspectionhttps://auth.rexplore.ai/api/auth/oauth2/introspect
End session (logout)https://auth.rexplore.ai/api/auth/oauth2/end-session

Scopes

ScopeGrants
openidRequired. Returns an ID token with the user's sub.
profilename and picture in the ID token and UserInfo
emailemail and email_verified
offline_accessA refresh token, so your app can stay signed in

The authorization code flow

Rexplore ID supports the authorization code grant with PKCE (code_challenge_method=S256). PKCE is required for public clients (mobile apps and single-page apps) and recommended for every client.

Loading diagram…

1. Redirect to Rexplore ID

https://auth.rexplore.ai/api/auth/oauth2/authorize
  ?response_type=code
  &client_id=YOUR_CLIENT_ID
  &redirect_uri=https%3A%2F%2Fapp.example.com%2Fcallback
  &scope=openid%20profile%20email%20offline_access
  &state=RANDOM_STATE
  &code_challenge=BASE64URL_SHA256_OF_VERIFIER
  &code_challenge_method=S256

Optional parameters:

ParameterEffect
login_hint=ada@example.comPre-fills the email field
prompt=create or screen=sign-upOpens Create account instead of sign-in

2. Exchange the code

curl -X POST https://auth.rexplore.ai/api/auth/oauth2/token \
  -H "Content-Type: application/x-www-form-urlencoded" \
  -d grant_type=authorization_code \
  -d code=AUTHORIZATION_CODE \
  -d redirect_uri=https://app.example.com/callback \
  -d client_id=YOUR_CLIENT_ID \
  -d code_verifier=ORIGINAL_CODE_VERIFIER

Confidential (server-side) clients also authenticate with their client secret.

3. Refresh

curl -X POST https://auth.rexplore.ai/api/auth/oauth2/token \
  -H "Content-Type: application/x-www-form-urlencoded" \
  -d grant_type=refresh_token \
  -d refresh_token=REFRESH_TOKEN \
  -d client_id=YOUR_CLIENT_ID

Store the new refresh token from every response: refresh tokens rotate on each use.

Tokens

TokenFormatLifetime
Access tokenJWT signed with RS25610 minutes
ID tokenJWT signed with RS25610 minutes
Refresh tokenOpaque30 days, rotated on every use

Reusing a refresh token that has already been exchanged revokes the whole token family (after a short grace period for retries), and the user has to sign in again. This protects against stolen refresh tokens.

Access tokens carry iss (https://auth.rexplore.ai), aud (the API the token is for), sub, email, name, email_verified and sid. There is no organization claim: workspace membership is resolved by each product.

The sub claim

sub is the stable user ID. New accounts look like rx|3f1c9a2e-.... Accounts that existed before Rexplore ID launched keep their earlier identifier (for example google-oauth2|...). Treat sub as an opaque string and never parse it.

Verify access tokens

APIs that accept Rexplore ID access tokens verify them locally with the public JWKS: check the signature, iss, aud and expiry.

import { createRemoteJWKSet, jwtVerify } from 'jose';

const JWKS = createRemoteJWKSet(new URL('https://auth.rexplore.ai/.well-known/jwks.json'));

export async function verifyAccessToken(token: string) {
  const { payload } = await jwtVerify(token, JWKS, {
    issuer: 'https://auth.rexplore.ai',
    audience: 'YOUR_API_AUDIENCE',
    algorithms: ['RS256'],
  });
  return payload; // payload.sub, payload.email, ...
}

Key rotation

Signing keys rotate every 90 days. The previous key stays in the JWKS for 30 days after rotation, so tokens signed just before a rotation keep verifying. Pick the key by the token's kid header, cache the JWKS, and refetch it when you see an unknown kid. Both libraries above do this for you.

Register an app

Apps are registered by Rexplore. Email hello@rexplore.ai with:

DetailNotes
App name, logo and home URLShown on the sign-in and consent screens
App typeWeb app: a confidential client with a client secret, for server-rendered apps and backends. Mobile or single-page app: a public client without a secret that must use PKCE.
Redirect URIsExact URLs Rexplore ID may redirect to after sign-in. Must use https://, except http://localhost for development.
Post-logout redirect URIsWhere to send users after they sign out
APIsWhich APIs your app needs access tokens for

You'll receive a client ID (and, for web apps, a client secret shown once).

Branded sign-in pages

Registered apps can have their own sign-in look: name, logo, colors and a short story column, with Secured by Rexplore ID under the form. Each app gets direct links:

https://auth.rexplore.ai/sign-in/<app-slug>
https://auth.rexplore.ai/sign-up/<app-slug>

Users still sign in with the same Rexplore ID.

MCP clients

AI tools connecting to the Luso8 MCP server don't need manual registration: they register themselves with OAuth dynamic client registration and use the same authorization code and PKCE flow.

Sign out

To sign the user out of Rexplore ID as well as your app, redirect to the end-session endpoint with the ID token and one of your registered post-logout URIs:

https://auth.rexplore.ai/api/auth/oauth2/end-session
  ?id_token_hint=ID_TOKEN
  &post_logout_redirect_uri=https%3A%2F%2Fapp.example.com%2F

Not yet available

Passkeys, enterprise SSO (SAML) and organization-enforced two-step verification are not available yet.

Edit on GitHub

Last updated on

On this page