Various AT Protocol integrations with obsidian
20
fork

Configure Feed

Select the types of activity you want to include in your feed.

web app type

+20 -5
+1 -1
client-metadata.json
··· 9 9 "grant_types": ["authorization_code", "refresh_token"], 10 10 "response_types": ["code"], 11 11 "token_endpoint_auth_method": "none", 12 - "application_type": "native", 12 + "application_type": "web", 13 13 "dpop_bound_access_tokens": false 14 14 }
+1 -1
manifest-beta.json
··· 1 1 { 2 2 "id": "atmosphere", 3 3 "name": "Atmosphere", 4 - "version": "0.1.16-beta.3", 4 + "version": "0.1.16-beta.4", 5 5 "minAppVersion": "0.15.0", 6 6 "description": "Various integrations with AT Protocol.", 7 7 "author": "treethought",
+18 -3
src/lib/oauth/oauth.ts
··· 67 67 const params = await waitForCallback; 68 68 69 69 console.log('[OAuth] Callback received, params:', params.toString()); 70 + console.log('[OAuth] State:', params.get('state')); 71 + console.log('[OAuth] Code:', params.get('code')); 72 + console.log('[OAuth] Issuer:', params.get('iss')); 70 73 console.log('[OAuth] Waiting for IndexedDB to settle...'); 74 + 75 + // Wait for IndexedDB transactions to settle (important on mobile) 76 + // PAR writes OAuth state to IndexedDB, need to ensure it's committed 77 + // before finalizeAuthorization tries to read it 71 78 await new Promise((resolve) => setTimeout(resolve, 1000)); 72 79 73 80 console.log('[OAuth] Starting token exchange...'); 74 - const { session } = await finalizeAuthorization(params); 75 - console.log('[OAuth] Token exchange successful!'); 76 - return session; 81 + console.log('[OAuth] About to call finalizeAuthorization with state:', params.get('state')); 82 + 83 + try { 84 + const { session } = await finalizeAuthorization(params); 85 + console.log('[OAuth] Token exchange successful!'); 86 + return session; 87 + } catch (error) { 88 + console.error('[OAuth] Token exchange failed:', error); 89 + console.error('[OAuth] Failed with params:', params.toString()); 90 + throw error; 91 + } 77 92 } 78 93 79 94 async restore(did: string): Promise<Session> {