WIP PWA for Grain
0
fork

Configure Feed

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

feat: navigate to return URL after OAuth callback

+4 -1
+4 -1
src/services/auth.js
··· 1 1 import { createQuicksliceClient } from 'quickslice-client-js'; 2 + import { router } from '../router.js'; 2 3 3 4 class AuthService { 4 5 #client = null; ··· 18 19 // Handle OAuth callback if present 19 20 if (window.location.search.includes('code=')) { 20 21 await this.#client.handleRedirectCallback(); 21 - window.history.replaceState({}, '', window.location.pathname); 22 + const returnUrl = sessionStorage.getItem('oauth_return_url') || '/'; 23 + sessionStorage.removeItem('oauth_return_url'); 24 + router.replace(returnUrl); 22 25 } 23 26 24 27 // Load user if authenticated