an app to share curated trails sidetrail.app
atproto nextjs react rsc
50
fork

Configure Feed

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

Move authorization URL redirect into try/catch

authored by

Emelia Smith and committed by
Tangled
363f5960 5a8b18b8

+2 -3
+2 -3
auth/actions.ts
··· 25 25 }); 26 26 27 27 authorizationUrl = url.toString(); 28 + redirect(authorizationUrl); 28 29 } catch (error) { 29 30 console.error("OAuth authorize error:", error); 30 31 const message = error instanceof Error ? error.message : "Unknown error"; 31 32 redirect("/login?error=" + encodeURIComponent(`Login failed: ${message}`)); 32 - } 33 - 34 - redirect(authorizationUrl); 33 + } 35 34 } 36 35 37 36 export async function logout(returnUrl: string = "/") {