societyai.org
Preparing the collaboration space...
Society AI society-ai.org
Developers

Testing and common problems

Trying it from your laptop, problems that come up often, and a checklist before going live.

Trying it from your laptop

You don't need to run a sign-in server yourself. Testing apps may use localhost URLs, so the app on your laptop can talk to https://accounts.society-ai.org directly.

  1. Ask for a testing app with the callback URL exactly as you use it on your laptop, for example http://127.0.0.1:8000/auth/callback, and put your email on the tester list.
  2. Fill in .env on your laptop with the testing app's Client ID and secret.
  3. Run your app and click sign in. The Society AI sign-in page says "Sign in to continue to your app name".
  4. Sign in with a tester account. The sign-in code goes to the tester's email as usual.

localhost and 127.0.0.1 count as different addresses. Register the one you actually open in the browser.

Back-channel logout can't reach your laptop, because the Society AI server can't call your localhost. Try that part on a staging server with an https://…society-ai.org address.

Common problems

What you seeMost likely causeFix
"Sign-in is unavailable right now", with redirect_uri in the page addressThe callback URL is one character off: trailing slash, http or https, port, localhost or 127.0.0.1Match the registered URL exactly
"This app is still in testing"A testing app, and the email used isn't on the tester listAsk an admin to add the email, or use the production app
error=invalid_scope on the callbackAsking for a scope that wasn't approvedMatch the scopes in .env to what the admin approved
invalid_grant on the code swapThe callback ran twice, the code is over 10 minutes old, or the code_verifier is from another attemptKeep a verifier per sign-in attempt, and don't reload the callback page
invalid_clientWrong secret, mixed up with the testing app, or already replacedCheck .env on the running server
Public pages keep redirectingThe automatic sign-in flag isn't saved before redirectingSee Automatic sign-in and sign-out
The member signed out on society-ai.org but is still signed in to your serviceBack-channel logout missing, blocked by CSRF (419), or sid not storedCheck the back-channel route's logs. Make sure it is excluded from CSRF.
Signing out ends on "Sign-in is unavailable right now"The id_token_hint isn't an ID token from your app, or it got damagedSend the latest ID token your app received
No membership claimsThe membership scope wasn't requestedAdd it to the scopes
Every sign-in creates a new usersai_sub isn't saved, for example because of $fillableUse forceFill like the Laravel example

Still stuck? Email support@society-ai.org with your Client ID, when it happened, and the error_description. Never include a secret or a token.

Checklist before going live

  • Using the production app, not the testing one
  • Every URL is https:// on a society-ai.org subdomain
  • The secret lives only on the server, not in a repo or browser code
  • PKCE S256 and state checked on every sign-in
  • ID tokens checked: signature, iss, aud, exp
  • Members recognised by sub
  • Back-channel logout tried on staging
  • The sign-out button goes to /oauth2/sessions/logout
  • Public pages still open for guests
  • Sign-in button and account menu follow step 9 of the Laravel guide

Start here support@society-ai.org