Table of contents
EVE SSO Flow
-
Register the app at https://developers.eveonline.com with the callback URL from
EVE_CALLBACK_URL, and put the issued client ID and secret in.env. -
Login:
GET /auth/evestores a randomstatein the session and redirects tologin.eveonline.comrequesting the scopes the chosen features need (see "Choosing what to link" on the Configuration page; a full link requests all 61 scopes ineveScopes, ininternal/app/auth.go): the read scopes from the OAuth2 catalog in CCP's ESI OpenAPI document, plus seven that can change something, each for one feature:Scope What the app does with it esi-fittings.write_fittings.v1"Save to EVE" in the fitting editor esi-mail.send_mail.v1sending mail from the compose page esi-mail.organize_mail.v1marking a mail as read esi-planets.manage_planets.v1reading colonies; CCP publishes no read scope for planetary industry, and the app only ever reads esi-calendar.respond_calendar_events.v1answering a calendar invitation esi-ui.open_window.v1opening a contract or other window in the game esi-ui.write_waypoint.v1setting a route in the game from the map The two other scopes that can change something in the game, contacts and fleets, are not requested. Characters linked before a scope was added keep the scopes they granted until they sign in again; the feature that needs the missing scope says so.
-
Callback:
GET /auth/callbackverifies thestate(constant-time, single-use), exchanges the authorization code for tokens, then verifies the access-token JWT: RS256 signature against CCP's JWKS (found via the OAuth discovery document),iss=login.eveonline.com. Character ID/name come from thesub/nameclaims. -
Persist: first login creates a row in
users; the character is upserted intocharacterswith the access/refresh tokens, expiry, and granted scopes. Re-login (or "Link another character" while signed in) attaches characters to the same account. The session token is rotated at sign-in. -
Character pull: the signed-in home page shows the character sheet: identity (name, portrait, corporation, birthday, security status), ISK wallet balance, total/unallocated SP, the currently training skill, and the 25 heaviest skills with names resolved via
GET /universe/types/{id}/(cached in-process and in thetype_namestable).
Tokens, authorization codes and the client secret are never logged; request logs contain paths only, no query strings.