MCPcopy Create free account
hub / github.com/UsefulSoftwareCo/executor / signInWithSso

Function signInWithSso

apps/host-selfhost/web/login.tsx:57–71  ·  view source on GitHub ↗
(providerId: string)

Source from the content-addressed store, hash-verified

55 };
56
57 const signInWithSso = async (providerId: string) => {
58 setBusy(true);
59 setError(null);
60 // Better Auth redirects the browser to the IdP; on callback it lands on
61 // `callbackURL`, so the deep-link target survives the round trip the same
62 // way it does for the email form's post-login navigation.
63 const result = await authClient.signIn.oauth2({
64 providerId,
65 callbackURL: postLogin,
66 });
67 if (result.error) {
68 setBusy(false);
69 setError(result.error.message ?? "Sign in failed");
70 }
71 };
72
73 const redeem = (event: FormEvent) => {
74 event.preventDefault();

Callers 1

LoginPageFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected