Reference

# OpenID Connect

Not using PHP? Identvia is a standard OpenID Connect provider. Use any certified library and point it at the issuer below.

## Discovery

 Issuerhttps://id.identvia.com Discovery[https://id.identvia.com/.well-known/openid-configuration](https://id.identvia.com/.well-known/openid-configuration) Authorizationhttps://id.identvia.com/oauth/authorize Tokenhttps://id.identvia.com/oauth/token Userinfohttps://id.identvia.com/oauth/userinfo JWKShttps://id.identvia.com/oauth/jwks.json Revocationhttps://id.identvia.com/oauth/revoke End sessionhttps://id.identvia.com/oauth/logout

## Rules Identvia enforces

- Authorization code flow only (response\_type=code). No implicit or hybrid flow.
- **PKCE with S256 is required for public clients** (single-page, mobile and native apps) and recommended for every client. Server-side apps that authenticate with a client secret may omit it, and may also omit the nonce, as OpenID Connect allows.
- Redirect URIs match exactly, character for character. No wildcards, no fragments. http://localhost only in Development environments.
- Authorization codes are single use and expire after 60 seconds. Reusing a code revokes the tokens it produced.
- ID tokens are signed with RS256. Access tokens last 10 minutes. Refresh tokens (scope offline\_access) rotate on every use; replaying an old one revokes the whole chain.
- The callback includes iss (RFC 9207). Check it.
- sub is pairwise: each app sees a different, stable ID for the same person.

## 1. Authorization request

HTTP

```
GET https://id.identvia.com/oauth/authorize
  ?response_type=code
  &client_id=oid_…
  &redirect_uri=https%3A%2F%2Fexample.com%2Fcallback
  &scope=openid%20email%20profile
  &state=<random, 32+ bytes>
  &nonce=<random, 32+ bytes>
  &code_challenge=<BASE64URL(SHA256(code_verifier))>
  &code_challenge_method=S256
```

Optional: prompt=none\|login\|consent, max\_age, login\_hint.

## 2. Token request

HTTP

```
POST https://id.identvia.com/oauth/token
Authorization: Basic base64(client_id:client_secret)
Content-Type: application/x-www-form-urlencoded

grant_type=authorization_code&code=…&redirect_uri=https%3A%2F%2Fexample.com%2Fcallback&code_verifier=…
```

Public clients send client\_id in the body instead of a secret.

Response

```
{
  "token_type": "Bearer",
  "access_token": "eyJ…",
  "expires_in": 600,
  "id_token": "eyJ…",
  "refresh_token": "…",          // only with offline_access
  "scope": "openid email profile"
}
```

## 3. Validate the ID token

1. Verify the signature with the key from the JWKS whose kid matches. Accept only RS256.
2. iss equals https://id.identvia.com; aud contains your client ID; azp, if present, is your client ID.
3. exp is in the future and iat is not (allow a minute of skew).
4. nonce equals the one you sent.
5. If you sent max\_age, check auth\_time.

## Claims

 ScopeClaims  openidsub, auth\_time, amr emailemail, email\_verified (only if the user shares it) profilename, given\_name, family\_name, picture, updated\_at (only what the user shares) offline\_accessA refresh token 

Users choose what to share on the consent screen, so a scope you asked for may still come back without its claims. Handle that.

## Native and desktop apps

Register the environment as a **Native & desktop app** in the developer portal. Redirect URIs may use:

- **Private-use URI schemes** in reverse-domain form (RFC 8252 §7.1), e.g. com.example.app:/oauth/identvia. Short schemes like myapp: are rejected.
- **Claimed HTTPS App Links** (iOS Universal Links / Android App Links).
- **Loopback** http://127.0.0.1:{port}/… or http://\[::1\]:{port}/…. Any port matches; the path must match exactly (RFC 8252 §7.3).

**iOS older than 17.4:** ASWebAuthenticationSession does not reliably return https:// callbacks. Prefer a private-use scheme on those versions; use Universal Links from iOS 17.4 onward.

---
Source: https://id.identvia.com/developers/docs/oidc
