Environment Config & Docs

Everything you need to wire up all three authentication flows against your Okta org at auth.iamroot.live.

1

Custom Domain

This portal uses auth.iamroot.live as the Okta custom domain. All authorization, token, and logout endpoints are served from this domain. Ensure your Okta org has a Custom Domain configured pointing to auth.iamroot.live before registering apps.

2

OIDC Standard Web App

Create an OIDC Web Application in Okta Admin → Applications → Create App Integration → OIDC → Web Application. Set the Sign-in redirect URI to your callback URL. Copy the Client ID and Client Secret into your environment.

3

SPA (Authorization Code + PKCE)

Create an OIDC Single-Page Application in Okta Admin → Applications → Create App Integration → OIDC → Single-Page Application. No client secret is used. Set the Sign-in redirect URI to your SPA callback URL and enable CORS for your origin.

4

SAML 2.0 Integration

Create a SAML 2.0 app in Okta Admin → Applications → Create App Integration → SAML 2.0. Set the Single Sign-On URL and Audience URI (SP Entity ID). Download the IdP metadata XML and note the SSO URL and certificate for your SP configuration.

Environment Variables

VariableRequiredDescription
OKTA_DOMAINYesYour Okta custom domain, e.g. auth.iamroot.live
OIDC_CLIENT_IDYesClient ID from your OIDC Web Application in Okta
OIDC_CLIENT_SECRETYesClient Secret from your OIDC Web Application in Okta
OIDC_REDIRECT_URIYesFull callback URL, e.g. https://yourdomain.com/api/oidc/callback
OIDC_POST_LOGOUT_URINoWhere Okta redirects after logout. Defaults to /oidc
SPA_CLIENT_IDYesClient ID from your OIDC Single-Page Application in Okta
SPA_REDIRECT_URIYesFull callback URL for the SPA, e.g. https://yourdomain.com/spa/callback
SAML_IDP_SSO_URLYesOkta IdP Single Sign-On URL from the SAML app metadata
SAML_IDP_ISSUERYesOkta IdP Issuer URI from the SAML app metadata
SAML_SP_ENTITY_IDYesYour SP Entity ID / Audience URI registered in Okta
SAML_SP_ACS_URLYesYour Assertion Consumer Service URL where Okta posts the SAMLResponse

.env template

# Okta Demo Portal — Environment Variables
# Copy this to .env and fill in your values

# ── Okta Custom Domain ──────────────────────────────────────────────────────
OKTA_DOMAIN=auth.iamroot.live

# ── OIDC Standard Web App (Authorization Code) ──────────────────────────────
OIDC_CLIENT_ID=
OIDC_CLIENT_SECRET=
OIDC_REDIRECT_URI=https://yourdomain.com/api/oidc/callback
OIDC_POST_LOGOUT_URI=https://yourdomain.com/oidc

# ── SPA (Authorization Code + PKCE) ─────────────────────────────────────────
SPA_CLIENT_ID=
SPA_REDIRECT_URI=https://yourdomain.com/spa/callback

# ── SAML 2.0 ────────────────────────────────────────────────────────────────
SAML_IDP_SSO_URL=https://auth.iamroot.live/app/<app-id>/sso/saml
SAML_IDP_ISSUER=http://www.okta.com/<org-id>
SAML_SP_ENTITY_ID=https://yourdomain.com/saml/metadata
SAML_SP_ACS_URL=https://yourdomain.com/api/saml/acs