Main coves client
1/// OAuth Configuration for Coves Backend OAuth
2///
3/// This configuration supports the backend's mobile OAuth flow.
4/// The backend handles all OAuth complexity (PKCE, DPoP, token exchange).
5///
6/// Uses private-use URI scheme per atproto spec (RFC 8252):
7/// - Format: social.coves:/callback (single slash!)
8/// - Works on both Android and iOS without Universal Links complexity
9class OAuthConfig {
10 // Custom URL scheme for deep linking
11 // Must match AndroidManifest.xml and Info.plist
12 // Uses reverse domain format per atproto spec
13 static const String customScheme = 'social.coves';
14
15 // Redirect URI using private-use URI scheme (RFC 8252)
16 // IMPORTANT: Single slash after scheme per RFC 8252!
17 static const String _redirectUri = '$customScheme:/callback';
18
19 /// Get the redirect URI (same for all environments)
20 static String get redirectUri => _redirectUri;
21
22 /// Get the callback scheme for FlutterWebAuth2
23 static String get callbackScheme => customScheme;
24
25 // OAuth Scopes - recommended scope for atProto
26 static const String scope = 'atproto transition:generic';
27
28 // Client name for display during authorization
29 static const String clientName = 'Coves';
30}