Various AT Protocol integrations with obsidian
20
fork

Configure Feed

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

longer sleep

+8 -21
+1 -1
manifest-beta.json
··· 1 1 { 2 2 "id": "atmosphere", 3 3 "name": "Atmosphere", 4 - "version": "0.1.16-beta.1", 4 + "version": "0.1.16-beta.2", 5 5 "minAppVersion": "0.15.0", 6 6 "description": "Various integrations with AT Protocol.", 7 7 "author": "treethought",
+1 -19
oauth-callback.html
··· 107 107 <script> 108 108 (function() { 109 109 try { 110 - // Prevent duplicate execution on mobile (when switching back to browser) 111 - const redirectKey = 'atmosphere_oauth_redirected'; 112 - if (sessionStorage.getItem(redirectKey) === 'true') { 113 - // Already redirected, show completion message 114 - document.querySelector('.spinner').style.display = 'none'; 115 - document.querySelector('h1').textContent = '✅ Redirected!'; 116 - document.getElementById('status').textContent = 'Return to Obsidian to complete login.'; 117 - document.getElementById('manual-link').classList.add('show'); 118 - return; 119 - } 120 - 121 110 // extract OAuth parameters from URL hash (not search string) 122 111 const params = new URLSearchParams(window.location.hash.slice(1)); 123 112 ··· 126 115 // store the URI for manual copy 127 116 document.getElementById('link-text').textContent = obsidianUri; 128 117 129 - // Mark as redirected BEFORE the redirect to prevent race conditions 130 - sessionStorage.setItem(redirectKey, 'true'); 131 - 132 - // Small delay to ensure any pending IndexedDB writes complete 133 - // This is important on mobile where the browser may suspend the tab 134 - setTimeout(function() { 135 - window.location.href = obsidianUri; 136 - }, 100); 118 + window.location.href = obsidianUri; 137 119 138 120 setTimeout(function() { 139 121 const spinner = document.querySelector('.spinner');
+6 -1
src/lib/oauth/oauth.ts
··· 65 65 new Notice('Continue login in the browser'); 66 66 67 67 const params = await waitForCallback; 68 - await new Promise((resolve) => setTimeout(resolve, 300)); 68 + 69 + console.log('[OAuth] Callback received, params:', params.toString()); 70 + console.log('[OAuth] Waiting for IndexedDB to settle...'); 71 + await new Promise((resolve) => setTimeout(resolve, 1000)); 69 72 73 + console.log('[OAuth] Starting token exchange...'); 70 74 const { session } = await finalizeAuthorization(params); 75 + console.log('[OAuth] Token exchange successful!'); 71 76 return session; 72 77 } 73 78