Skip to content

Identity and Accounts

When you set up Spokes, you might notice that managing user logins works a bit differently than in standalone chat apps.

This page explains how accounts work, where to manage them, and how to connect external OpenID Connect (OIDC) providers.

Spokes does not store user login passwords directly in its own database. Instead, it delegates authentication to an Identity Provider (IdP) using OpenID Connect (OIDC).

Think of it like "Sign in with Google" or "Sign in with Apple", except you control the identity provider on your own server. You can use the Casdoor instance that comes built into the Spokes container, or connect an external provider like Authentik, Authelia, Keycloak, or Pocket ID.

Here is what happens when someone signs into Spokes:

  1. A user opens your Spokes server URL (or taps Connect in the mobile app).
  2. Spokes redirects them to your identity provider's login page.
  3. The user signs in with their username/email and password (or a linked provider like Discord).
  4. Once authenticated, the identity provider sends them back to Spokes with a signed OpenID token.
  5. Spokes verifies the token. If this is the user's first time logging in, Spokes automatically creates a profile for them using the name and email from the identity provider.

Because authentication and chat profiles are separate layers, user management happens in two places.

Here is how that works when using the built-in Casdoor provider:

1. The Casdoor Dashboard (For Logins and Signups)

Section titled “1. The Casdoor Dashboard (For Logins and Signups)”

Anything related to signing into the server happens in Casdoor. You use the Casdoor admin dashboard to:

  • Create new user accounts.
  • Change or reset user login passwords.
  • Generate invitation codes so friends can register their own accounts.
  • Configure social login providers (like Discord Authentication).

Tip: As a Spokes admin, you can open the Casdoor dashboard at any time by going to the Members & Groups (/organization) page in Spokes and clicking the Open Casdoor button in the top right corner.

2. The Spokes App (For Profiles, Groups, and Permissions)

Section titled “2. The Spokes App (For Profiles, Groups, and Permissions)”

Anything related to what happens inside Spokes is managed directly in Spokes:

  • Users can update their display name, avatar, bio, and custom status in their Spokes profile.
  • Admins can assign users to custom groups, manage channel access, and configure permissions in Members & Groups (/organization) and Server Settings.
  • Admins can deactivate, suspend, or ban accounts, or revoke active device sessions.

(Note: Changing a user's display name or email inside Spokes only updates their Spokes profile. It does not change their login credentials in Casdoor.)

  • Better Password Security: Relying on a dedicated OIDC identity provider means authentication follows standard OpenID Connect and PKCE flows rather than custom password handling.
  • Single Sign-On (SSO): Self-hosting multiple apps usually means forcing your friends or family to remember a different login for every service. With an identity provider, everyone only needs one account across your self-hosted apps.
  • Works Out of the Box: By bundling Casdoor inside the Spokes container, you do not have to set up an external SSO server if you do not have one. And if you want to secure other self-hosted apps later, you can reuse the Casdoor instance that is already running inside Spokes.

If you choose External Provider during the Setup Wizard (or under Server Settings -> System Setup -> Identity Provider) to connect Authentik, Authelia, Keycloak, Pocket ID, or a standalone Casdoor server, configure your OIDC client with the following settings:

  • Grant Types: authorization_code and refresh_token (with PKCE / S256 enabled for mobile login).
  • Scopes: openid, profile, email.

Add the following URLs to your identity provider's Allowed Redirect URIs (and Post-Logout Redirect URIs where applicable), replacing https://spokes.yourdomain.com with your Server Public URL:

https://spokes.yourdomain.com/signin-oidc
https://spokes.yourdomain.com/signout-callback-oidc
https://spokes.yourdomain.com/sso/mobile-logout-complete
spokes://auth-callback
  • https://<your-spokes-domain>/signin-oidc: Used by the Web UI and Desktop app to complete login.
  • https://<your-spokes-domain>/signout-callback-oidc: Used by the Web UI and Desktop app after signing out.
  • spokes://auth-callback: Required for the native iOS and Android apps to complete PKCE login. Without this custom deep link in your Allowed Redirect URIs, the mobile apps will fail with an "Invalid Redirect URI" error when signing in.
  • https://<your-spokes-domain>/sso/mobile-logout-complete: Used by the native mobile apps when signing out of the identity provider.

(Note: If you use the built-in Casdoor provider, Spokes configures and updates all four Redirect URIs automatically.)