Skip to content

Provider Behavior

The mock IDP does not flatten providers into one generic OAuth shape — each provider type replicates the real provider’s wire behavior: which tokens are issued, the exact token response fields, the profile endpoints, and the ID token claim set. An app tested against a mock github client exercises the same code paths it would against real GitHub, so there is no protocol gap to discover in production.

The OAuth Flow page describes the shared authorization code flow; each provider page below describes how that provider type differs:

  • Google — OIDC with Google’s fixed ID token claim set
  • GitHub — plain OAuth2 with GitHub-shaped profile endpoints
  • Facebook — plain OAuth2 with a Graph-style GET /me profile
  • Apple — OIDC with Apple’s form POST and privacy quirks
  • Custom — the OIDC baseline provider, and the only one with custom claims support
GoogleGitHubFacebookAppleCustom
ProtocolOIDCOAuth2 (no OIDC)OAuth2 (no OIDC)OIDCOIDC
id_token issuedYes (scope openid)NeverNeverAlways for code flowYes (scope openid)
Custom claimsNoNoNoNoYes
token_type"Bearer""bearer" (lowercase)"bearer""Bearer""Bearer"
expires_in in token responseYesOmitted (GitHub app tokens don’t expire)YesYesYes
PKCEOptional S256Ignored (GitHub web flow has none)IgnoredOptional S256Optional S256
Profile endpoint/oauth/userinfoGET /user, GET /user/emails (GitHub-shaped)GET /me/oauth/userinfo/oauth/userinfo
Token exchangePOSTPOSTGET or POST (Graph uses GET)POSTPOST

Two behaviors apply across every provider type:

  • Custom claims are a custom-provider feature — only custom clients accept the identity claims map; create and update requests that set claims on a google, github, apple, or facebook client are rejected with a 400. See Custom.
  • emailVerified, isActive, and the profile fields (username, name, avatarUrl) work on all provider types — see Clients & Identities.