Login with FsHub

OAuth 2.0 Authorization Code flow with OpenID Connect and mandatory S256 PKCE.

Register an application

Sign in, open OAuth applications, and submit your application for review. Redirect URIs are exact-match, HTTPS-only values; HTTP is accepted only for localhost loopback development. Public clients receive no secret. Confidential clients can reveal their secret once after confirming the account password.

Discovery

Configure your OpenID Connect library from https://fshub.io/.well-known/openid-configuration. Signing keys are published at https://fshub.io/.well-known/jwks.json.

Authorization flow

  1. Create a cryptographically random state value and PKCE verifier.
  2. Send the user to https://fshub.io/oauth/authorize with response_type=code, your exact redirect_uri, requested scope, state, the SHA-256 PKCE challenge, and code_challenge_method=S256.
  3. Verify the returned state, then exchange the one-time code at https://fshub.io/oauth/token using the original code_verifier.
  4. Validate the ID token issuer, audience, signature, expiry and nonce. Use the access token as Authorization: Bearer ACCESS_TOKEN.

Access and ID tokens last one hour. Refresh tokens last 30 days and rotate on use. Password, implicit, device and client-credentials grants are not supported.

FsHub remembers a pilot's consent for each application and granted set of scopes. Use prompt=consent to require the consent screen again. Use prompt=none only when no interaction is acceptable: FsHub returns login_required when there is no suitable FsHub login session and consent_required when the requested scopes have not already been granted.

Identity scopes

  • openid — identify the FsHub account and issue an ID token.
  • profile — name, profile URL, avatar and profile update time.
  • email — email address and activation status; request only when needed.

Read-only API scopes

pilots:read
Read pilot profiles, statistics and public activity
flights:read
Read flights, tracks, achievements and screenshots
airports:read
Read airport, weather and movement information
airlines:read
Read virtual airline profiles, pilots, routes and activity
planning:read
Read the signed-in pilot's current plan and chart bag
social:read
Read the signed-in pilot's friends list

Only endpoints explicitly enabled for the granted scope accept OAuth access tokens. Tracking, uploads, account tokens, financial operations, airline management, PIREP decisions and other mutations remain unavailable to OAuth clients.

UserInfo and revocation

Fetch consented claims from https://fshub.io/oauth/userinfo. Revoking a token at https://fshub.io/oauth/revoke revokes that access-token and refresh-token pair; it does not remove the pilot's consent for the application. Pilots can revoke all tokens and remove remembered consent for an application from FsHub Integration Settings.

Rate limits

  • /oauth/token, /oauth/introspect and /oauth/revoke 60 requests per minute per source IP, in a shared bucket.
  • /oauth/userinfo 120 requests per minute per authenticated pilot.
  • /oauth/authorize no requests-per-minute limit, with a maximum of 10 pending authorization transactions per browser session.

Existing pilot tokens

The existing X-Pilot-Token API authentication method remains supported and unchanged. Send exactly one authentication method per request; requests containing both a Bearer token and X-Pilot-Token are rejected.