CastyrDocs

Overview

Castyr developer docs. Let people sign in to your app, TV or bot with their Castyr account.

Castyr SSO is a standard OAuth 2.0 and OpenID Connect provider at https://sso.castyr.cloud, so any certified OAuth / OIDC library works with it. You never see anyone's password.

Get started

Register an app

Go to Developers → Register an app (you need a Castyr account) and pick the type that matches where your code runs.

Copy your credentials

Every app gets a client_id. Web apps also get a client_secret, shown once: keep it on your server.

Pick the flow

Follow the guide for your app type from the table below.

Which flow?

App typeClientFlow
Web app (server-side)Confidential: has a secretAuthorization code (+ PKCE recommended)
Single-page appPublic: no secretAuthorization code + PKCE
Mobile / desktop appPublicAuthorization code + PKCE, custom scheme or loopback redirect
TV / devicePublicDevice flow: the user enters a code at /activate
BotPublicDevice flow at /activate/bot. Node bots: the Bot SDK

Endpoints

Libraries that support discovery only need the issuer; everything else is in the discovery document.

URL
Issuerhttps://sso.castyr.cloud
Discoveryhttps://sso.castyr.cloud/.well-known/openid-configuration
Authorizehttps://sso.castyr.cloud/oauth/authorize
Tokenhttps://sso.castyr.cloud/oauth/token
Device codehttps://sso.castyr.cloud/oauth/device/code
User infohttps://sso.castyr.cloud/oauth/userinfo
Revokehttps://sso.castyr.cloud/oauth/revoke
Signing keyshttps://sso.castyr.cloud/.well-known/jwks.json

Ground rules

  • Only response_type=code. There is no implicit flow and no password grant.
  • PKCE uses S256 only, and it is required for public clients.
  • Redirect URIs must match a registered one exactly. No wildcards and no fragments.
  • Access tokens last an hour. Refresh tokens rotate on every use.
  • Keep your client secret and refresh tokens on your server, never in a web page or app bundle.

On this page