1.3 KiB
1.3 KiB
OAuth and App Link contract
Registered values
Authorization endpoint: https://gitea.ubisampaju.synology.me/login/oauth/authorize
Token endpoint: https://gitea.ubisampaju.synology.me/login/oauth/access_token
Client ID: 225589df-b992-4676-aae0-b2534ba7452d
Redirect URI: https://gitea.ubisampaju.synology.me/ubisampaju/oauth/callback
Grant: Authorization Code with PKCE
PKCE method: S256
Client secret: not used
Required login flow
- Create a random state and PKCE verifier.
- Derive the S256 challenge.
- Store only the minimum short-lived transaction state.
- Open the authorization URL in the system browser.
- Receive the verified HTTPS App Link.
- Validate scheme, host, path, state, error, and authorization code.
- Exchange the code using the original verifier.
- Store tokens with Keystore-backed protection.
- Clear transaction state on success, cancellation, or error.
External prerequisite
The host must serve a valid Android Digital Asset Links file at:
https://gitea.ubisampaju.synology.me/.well-known/assetlinks.json
It must identify the final Android application ID and signing-certificate SHA-256 fingerprint. OAuth end-to-end testing is blocked until those values and hosting are available.