tangled
alpha
login
or
join now
thisismissem.social
/
sidetrail
forked from
danabra.mov/sidetrail
0
fork
atom
an app to share curated trails
0
fork
atom
overview
issues
pulls
pipelines
Move authorization URL redirect into try/catch
Emelia Smith
3 months ago
4b4e99a5
f404ddcf
+2
-3
1 changed file
expand all
collapse all
unified
split
auth
actions.ts
+2
-3
auth/actions.ts
reviewed
···
25
25
});
26
26
27
27
authorizationUrl = url.toString();
28
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
32
-
}
33
33
-
34
34
-
redirect(authorizationUrl);
33
33
+
}
35
34
}
36
35
37
36
export async function logout(returnUrl: string = "/") {