31 lines
963 B
Plaintext
31 lines
963 B
Plaintext
---
|
|
globs: esi_sso.go
|
|
description: EVE SSO interface and implementation standards
|
|
---
|
|
|
|
# EVE SSO Interface Standards
|
|
|
|
## Core Interface
|
|
The SSO system provides a simple interface:
|
|
```go
|
|
token, err := sso.GetToken(ctx, "CharacterName")
|
|
```
|
|
|
|
## Key Principles
|
|
- Use character NAMES, not IDs (nobody knows character IDs)
|
|
- Handle all SSO complexity behind the scenes
|
|
- Automatic token refresh when expired
|
|
- Automatic re-authentication when refresh fails
|
|
- Store tokens in database for persistence
|
|
|
|
## Implementation Details
|
|
- [esi_sso.go](mdc:esi_sso.go) contains the SSO implementation
|
|
- Uses PKCE for secure OAuth2 flow
|
|
- Implements proper callback handling with HTTP server
|
|
- Includes comprehensive logging for debugging
|
|
- Handles token exchange and refresh automatically
|
|
|
|
## Error Handling
|
|
- Always log errors with context (character name, operation)
|
|
- Provide clear error messages for authentication failures
|
|
- Handle network timeouts and API errors gracefully |