[READ-ONLY] a fast, modern browser for the npm registry
0
fork

Configure Feed

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

fix: redirect user to original path after user cancel oauth login (#1285)

authored by

Nandkishor Jadoun and committed by
GitHub
82528008 da4a9639

+9
+9
server/api/auth/atproto.get.ts
··· 70 70 handleResolver, 71 71 }) 72 72 73 + const error = query.error 74 + 75 + // user cancelled explicitly 76 + if (error === 'access_denied') { 77 + const returnToURL = getCookie(event, 'auth_return_to') || '/' 78 + deleteCookie(event, 'auth_return_to', { path: '/' }) 79 + return sendRedirect(event, returnToURL) 80 + } 81 + 73 82 if (!query.code) { 74 83 // Validate returnTo is a safe relative path (prevent open redirect) 75 84 // Only set cookie on initial auth request, not the callback