Overview
This guide shows you how to integrate Hopae Connect with the standard OpenID Connect (OIDC) Authorization Code flow. You will redirect users to the Hopae OpenID Provider (issuer:https://connect.hopae.com
), receive an authorization code on your redirect URI, and exchange it for tokens using the OIDC token endpoint. For a shorter walkthrough, start with the Quickstart Guide.
How It Works
Dashboard Configuration
Redirect URI Management
Configure your redirect URIs in the Hopae Developer Dashboard:- Open your application in the dashboard.
- Navigate to Developer settings and add each redirect URI you expect to use (production, staging, mobile deep links, etc.).
Authorization Request Construction
Use the/auth
endpoint on the issuer domain (https://sandbox.connect.hopae.com/auth
for sandbox, https://connect.hopae.com/auth
for production):
Authorization Request Parameters
Parameter | Required | Description | Example |
---|---|---|---|
client_id | Yes | Your Hopae Connect client identifier | 5SZdu0fn |
response_type | Yes | Must be code | code |
redirect_uri | Yes | Whitelisted callback URI | https://localhost:3000/callback |
scope | Yes | Include openid ; add profile to receive normalized identity data | openid profile |
nonce | Recommended | Replay protection for ID tokens (especially browser-based clients) | 4d9961bd-12a9-46d0-803f-aafef1bf814d |
code_challenge | Conditional | PKCE code challenge (required for public clients) | E9Melhoa2OwvFrEMTJguCHaoeK1t8URWbuGJSstw-cM |
code_challenge_method | Conditional | Must be S256 when code_challenge is provided | S256 |
prompt | Optional | Force a specific UX path (login , consent , select_account ) | login |
PKCE Support
PKCE (Proof Key for Code Exchange) is strongly recommended for native and SPA clients.Store the
code_verifier
securely (session storage, encrypted cookie, etc.) so you can supply it during the token exchange.Callback Handling
After the user completes verification, Hopae redirects to yourredirect_uri
with either an authorization code or an error.
Success Response:
state
value before proceeding.
Token Exchange
Exchange the authorization code for tokens using the OIDC/token
endpoint.
ID Token Claims
Wondering what data you’ll get back? See the Return Data Model for normalized claims, assurance, issuers, presentation, and evidence. Explore the Return Data Model →Mobile Integration
You can initiate the OIDC flow from native apps using platform browser sessions (ASWebAuthenticationSession, Custom Tabs, etc.). The Expo example below demonstrates the pattern:On iOS,
AuthSession
uses ASWebAuthenticationSession
; on Android it launches a Custom Tab. This keeps user credentials within trusted system components while preserving the OIDC redirect semantics.Common Issues and Solutions
invalid_redirect_uri
invalid_redirect_uri
- Ensure the URI is listed in your dashboard allow list (exact match).
- URL-encode the value when placing it on the query string.
- Confirm you’re using the correct environment (
sandbox
vs production).
invalid_grant
invalid_grant
- Authorization codes expire in 5 minutes and are single-use.
- Verify the
code_verifier
matches the originalcode_challenge
. - Confirm you are targeting the correct issuer when exchanging the code.
State or nonce validation failures
State or nonce validation failures
- Persist the generated values securely between request and callback.
- Reject callbacks where
state
ornonce
is missing or mismatched. - Log mismatches (without sensitive data) for investigation.