@seamless-auth/react 0.16.0 → 0.17.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +28 -0
- package/README.md +69 -11
- package/dist/index.d.ts +2 -2
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/dist/routes.js +1 -1
- package/dist/routes.js.map +1 -1
- package/dist/views/VerifyMagicLink.d.ts +4 -2
- package/package.json +2 -2
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,33 @@
|
|
|
1
1
|
# @seamless-auth/react
|
|
2
2
|
|
|
3
|
+
## 0.17.1
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- 782583c: In bearer transport, a request that carries a token no longer follows a redirect to an origin outside `apiHost` and `trustedOrigins`. The client asks `fetch` for `redirect: 'manual'`, follows a redirect to a trusted origin itself (up to five hops, turning a `303`, or a `301` or `302` after a POST, into a GET as `fetch` does), and rejects any other with the new `UntrustedRedirectError` without sending the token on. Where the platform follows redirects regardless, as React Native's `fetch` does, a response that ended on another origin is rejected instead. A caller that sets `redirect` itself keeps that choice, and the final-origin check still applies. Requests without a token, and cookie transport, are unchanged.
|
|
8
|
+
- Updated dependencies [782583c]
|
|
9
|
+
- Updated dependencies [e3cf1f9]
|
|
10
|
+
- @seamless-auth/client@0.7.0
|
|
11
|
+
|
|
12
|
+
## 0.17.0
|
|
13
|
+
|
|
14
|
+
### Minor Changes
|
|
15
|
+
|
|
16
|
+
- 59802e2: Add a confirmation step for magic links opened on another device.
|
|
17
|
+
|
|
18
|
+
A magic link opened on a device other than the one that asked for it now waits for the reader to approve it (auth API 0.19.0 and later). The bundled verify screens show which kind of device asked and when, and offer "Yes, sign in that device" or "No, this wasn't me". Approving signs in the requesting device and tells the reader to return to it; declining changes nothing.
|
|
19
|
+
|
|
20
|
+
`@seamless-auth/client` adds `client.confirmMagicLink(token)`, the `getMagicLinkConfirmation`, `isMagicLinkConfirmationRequired`, `describeMagicLinkDevice`, `magicLinkConfirmationPrompt` and `confirmMagicLinkSignIn` helpers, and the `MagicLinkConfirmation` and `MagicLinkDeviceClass` types. In bearer mode the verify call now sends the sign-in's ephemeral token when one is held. A custom verify screen that treats every failure as an invalid link should check `getMagicLinkConfirmation(error)` first.
|
|
21
|
+
|
|
22
|
+
The React Native README describes the new step for apps that handle magic links.
|
|
23
|
+
|
|
24
|
+
### Patch Changes
|
|
25
|
+
|
|
26
|
+
- bd62b41: Point the README's Next.js section at `@seamless-auth/nextjs`, which serves the `/auth` routes from a route handler and resolves the session with `getSeamlessSession`. It no longer says a Next.js server package is still planned.
|
|
27
|
+
- 9852bd4: The README's Next.js example reads the service token from `SEAMLESS_SERVICE_TOKEN` instead of `API_SERVICE_TOKEN`. The auth server still reads `API_SERVICE_TOKEN`; both hold the same value.
|
|
28
|
+
- Updated dependencies [59802e2]
|
|
29
|
+
- @seamless-auth/client@0.6.0
|
|
30
|
+
|
|
3
31
|
## 0.16.0
|
|
4
32
|
|
|
5
33
|
### Minor Changes
|
package/README.md
CHANGED
|
@@ -119,15 +119,48 @@ The package works in the Next.js App Router. Every module ships with a `'use cli
|
|
|
119
119
|
`AuthProvider` can be rendered straight from a server layout, and nothing touches `window` or
|
|
120
120
|
storage while rendering on the server.
|
|
121
121
|
|
|
122
|
+
The server half is [`@seamless-auth/nextjs`](https://www.npmjs.com/package/@seamless-auth/nextjs).
|
|
123
|
+
It serves the `/auth` routes from a route handler on the application's own origin and reads the
|
|
124
|
+
session in server components, so a Next.js app needs no separate backend for auth:
|
|
125
|
+
|
|
126
|
+
```bash
|
|
127
|
+
npm install @seamless-auth/nextjs @seamless-auth/react
|
|
128
|
+
```
|
|
129
|
+
|
|
130
|
+
```ts
|
|
131
|
+
// app/auth/[...seamless]/route.ts
|
|
132
|
+
import { createSeamlessAuthHandler } from '@seamless-auth/nextjs';
|
|
133
|
+
|
|
134
|
+
export const { GET, POST, PUT, PATCH, DELETE } = createSeamlessAuthHandler({
|
|
135
|
+
authServerUrl: process.env.AUTH_SERVER_URL!,
|
|
136
|
+
audience: process.env.AUTH_SERVER_URL!,
|
|
137
|
+
cookieSecret: process.env.COOKIE_SIGNING_KEY!,
|
|
138
|
+
serviceSecret: process.env.SEAMLESS_SERVICE_TOKEN!,
|
|
139
|
+
jwksKid: process.env.JWKS_KID,
|
|
140
|
+
});
|
|
141
|
+
```
|
|
142
|
+
|
|
122
143
|
```tsx
|
|
123
144
|
// app/layout.tsx
|
|
145
|
+
import { cookies, headers } from 'next/headers';
|
|
146
|
+
import { getSeamlessSession } from '@seamless-auth/nextjs';
|
|
124
147
|
import { AuthProvider } from '@seamless-auth/react';
|
|
125
148
|
|
|
126
|
-
export
|
|
149
|
+
export const dynamic = 'force-dynamic';
|
|
150
|
+
|
|
151
|
+
export default async function RootLayout({ children }: { children: React.ReactNode }) {
|
|
152
|
+
const session = await getSeamlessSession(await cookies(), {
|
|
153
|
+
authServerUrl: process.env.AUTH_SERVER_URL!,
|
|
154
|
+
cookieSecret: process.env.COOKIE_SIGNING_KEY!,
|
|
155
|
+
serviceSecret: process.env.SEAMLESS_SERVICE_TOKEN!,
|
|
156
|
+
jwksKid: process.env.JWKS_KID,
|
|
157
|
+
userAgent: (await headers()).get('user-agent') ?? undefined,
|
|
158
|
+
});
|
|
159
|
+
|
|
127
160
|
return (
|
|
128
161
|
<html lang="en">
|
|
129
162
|
<body>
|
|
130
|
-
<AuthProvider apiHost={
|
|
163
|
+
<AuthProvider apiHost="" initialSession={session}>
|
|
131
164
|
{children}
|
|
132
165
|
</AuthProvider>
|
|
133
166
|
</body>
|
|
@@ -136,6 +169,14 @@ export default function RootLayout({ children }: { children: React.ReactNode })
|
|
|
136
169
|
}
|
|
137
170
|
```
|
|
138
171
|
|
|
172
|
+
`apiHost=""` sends every auth request to `/auth` on the page's own origin, which is the route
|
|
173
|
+
handler above. The full guide, including route protection in `proxy.ts`, is at
|
|
174
|
+
[docs.seamlessauth.com/build/nextjs](https://docs.seamlessauth.com/build/nextjs/), and
|
|
175
|
+
`seamless init my-app --nextjs` scaffolds a working starter.
|
|
176
|
+
|
|
177
|
+
The auth server reads the service token from `API_SERVICE_TOKEN` and the app reads it from
|
|
178
|
+
`SEAMLESS_SERVICE_TOKEN`; both hold the same value.
|
|
179
|
+
|
|
139
180
|
Things to know:
|
|
140
181
|
|
|
141
182
|
- **Use custom UI, not `AuthRoutes`.** The bundled screens route with react-router, which a Next.js
|
|
@@ -167,13 +208,13 @@ Only `user` is required. The provider still revalidates in the background, witho
|
|
|
167
208
|
server could not see (for example an expired access cookie with a live refresh cookie) still signs
|
|
168
209
|
in. `initialSession` is read once, when the provider creates its session.
|
|
169
210
|
|
|
170
|
-
|
|
171
|
-
the access cookie locally and asks the auth API directly. It
|
|
172
|
-
the session cookies have to reach the Next.js server,
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
211
|
+
`getSeamlessSession` from `@seamless-auth/nextjs` resolves the session on the server: it verifies
|
|
212
|
+
the adapter's access cookie locally and asks the auth API directly. It never refreshes, so it returns
|
|
213
|
+
`null` for an expired access cookie and the provider renews the session in the browser. The session cookies have to reach the Next.js server, which they do when the route handler
|
|
214
|
+
serves `/auth` from the same origin. Do not forward the browser's cookies to `/auth/users/me` from
|
|
215
|
+
the server: when the access cookie has expired the adapter rotates the refresh token in a response
|
|
216
|
+
the browser never receives, and the browser's next refresh is then treated as a replay and revokes
|
|
217
|
+
the session.
|
|
177
218
|
|
|
178
219
|
`refreshSession({ background: true })` is public, for revalidating a session your UI already shows
|
|
179
220
|
(on window focus, for example) without flashing a loading state.
|
|
@@ -1006,8 +1047,11 @@ The landing route verifies the token from the query string, then refreshes its o
|
|
|
1006
1047
|
|
|
1007
1048
|
```tsx
|
|
1008
1049
|
function CustomMagicLinkLanding() {
|
|
1009
|
-
|
|
1050
|
+
// plus: import { useEffect, useState } from 'react', and
|
|
1051
|
+
// getMagicLinkConfirmation, magicLinkConfirmationPrompt from '@seamless-auth/client'
|
|
1052
|
+
const { refreshSession } = useAuth();
|
|
1010
1053
|
const authClient = useAuthClient();
|
|
1054
|
+
const [prompt, setPrompt] = useState('');
|
|
1011
1055
|
|
|
1012
1056
|
useEffect(() => {
|
|
1013
1057
|
const token = new URLSearchParams(window.location.search).get('token');
|
|
@@ -1018,14 +1062,27 @@ function CustomMagicLinkLanding() {
|
|
|
1018
1062
|
// Refresh here too. This tab set the cookie, but its provider state
|
|
1019
1063
|
// was loaded before the cookie existed.
|
|
1020
1064
|
await refreshSession();
|
|
1065
|
+
return;
|
|
1021
1066
|
}
|
|
1067
|
+
|
|
1068
|
+
const held = getMagicLinkConfirmation(error);
|
|
1069
|
+
if (held) setPrompt(magicLinkConfirmationPrompt(held));
|
|
1022
1070
|
});
|
|
1023
1071
|
}, [authClient, refreshSession]);
|
|
1024
1072
|
|
|
1025
|
-
|
|
1073
|
+
// Opened on another device: ask before calling confirmMagicLinkSignIn.
|
|
1074
|
+
return <p>{prompt || 'Finishing sign-in...'}</p>;
|
|
1026
1075
|
}
|
|
1027
1076
|
```
|
|
1028
1077
|
|
|
1078
|
+
A link opened on a device other than the one that asked for it is not used straight away. The
|
|
1079
|
+
verify call fails with a `409` that `getMagicLinkConfirmation(error)` (from `@seamless-auth/client`)
|
|
1080
|
+
reads, giving the requesting device's platform and when it asked. Show that to the reader, and only
|
|
1081
|
+
if they approve call `confirmMagicLinkSignIn({ client: authClient, token })`. That signs in the
|
|
1082
|
+
device that asked for the link, through its poll, not this one, so tell the reader to go back to
|
|
1083
|
+
it. The bundled `/verify-magiclink` screen does all of this, with a "No, this wasn't me" option that
|
|
1084
|
+
changes nothing.
|
|
1085
|
+
|
|
1029
1086
|
The auth API emails a link pointing at `/verify-magiclink?token=...`, so a custom app must serve that
|
|
1030
1087
|
path.
|
|
1031
1088
|
|
|
@@ -1217,6 +1274,7 @@ The built-in flows assume compatible endpoints for:
|
|
|
1217
1274
|
- `POST /magic-link`
|
|
1218
1275
|
- `/magic-link/check`
|
|
1219
1276
|
- `/magic-link/verify/:token`
|
|
1277
|
+
- `POST /magic-link/verify/:token/confirm`
|
|
1220
1278
|
- `/oauth/providers`
|
|
1221
1279
|
- `/oauth/:providerId/start`
|
|
1222
1280
|
- `/oauth/:providerId/callback`
|
package/dist/index.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { AuthContextType, AuthPorts, AuthProvider, useAuth } from './AuthProvider';
|
|
2
2
|
import { createSeamlessAuthClient, CredentialUpdateResult, CreateOrganizationInput, CurrentUserResult, FinishOAuthLoginInput, FinishOAuthLoginResult, LoginInput, LoginMethod, LoginStartResult, MessageResult, OAuthProvider, OAuthProvidersResult, PublicSystemConfigResult, OrganizationMemberInput, OrganizationMemberUpdateInput, OrganizationMembersResult, OrganizationMembershipResult, OrganizationResult, OrganizationSwitchResult, OrganizationsResult, PasskeyLoginData, PasskeyAttachment, PasskeyMetadata, PasskeyRegistrationData, RegisterInput, RegisterPasskeyOptions, SeamlessAuthClient, SeamlessAuthClientOptions, StartOAuthLoginInput, StartOAuthLoginResult, StepUpMethod, StepUpStatus, StepUpPrfData, TotpEnrollmentStartResult, TotpStatus, UpdateOrganizationInput } from '@seamless-auth/client';
|
|
3
|
-
import { getOAuthErrorCode, getPasskeyPolicyErrorCode, getWebAuthnErrorDetail, isUnauthenticated, OAuthErrorCode, PasskeyPolicyErrorCode, SeamlessAuthError, UntrustedOriginError, WebAuthnErrorDetail } from '@seamless-auth/client';
|
|
3
|
+
import { getOAuthErrorCode, getPasskeyPolicyErrorCode, getWebAuthnErrorDetail, isUnauthenticated, OAuthErrorCode, PasskeyPolicyErrorCode, SeamlessAuthError, UntrustedOriginError, UntrustedRedirectError, WebAuthnErrorDetail } from '@seamless-auth/client';
|
|
4
4
|
import type { SeamlessAuthResult } from '@seamless-auth/client';
|
|
5
5
|
import { encodePrfSalt, extractPasskeyPrfResult, isPasskeyPrfSupported, PasskeyPrfInput, PasskeyPrfResult } from '@seamless-auth/client';
|
|
6
6
|
import { useAuthClient } from './hooks/useAuthClient';
|
|
@@ -10,5 +10,5 @@ import { usePasskeySupport } from './hooks/usePasskeySupport';
|
|
|
10
10
|
import { hasScopedRole, roleGrantsAccess } from '@seamless-auth/client';
|
|
11
11
|
import { Credential, Organization, OrganizationMembership, User } from '@seamless-auth/client';
|
|
12
12
|
import type { InitialSession, OAuthRedirectOutcome, OAuthRedirectPort, PasskeyPort, StoredTokens, TokenStoragePort, RefreshSessionOptions, TransportOptions } from '@seamless-auth/client';
|
|
13
|
-
export { AuthProvider, createSeamlessAuthClient, encodePrfSalt, extractPasskeyPrfResult, getOAuthErrorCode, getPasskeyPolicyErrorCode, getWebAuthnErrorDetail, hasNonPasskeyLoginMethod, hasScopedRole, isPasskeyPrfSupported, isUnauthenticated, roleGrantsAccess, SeamlessAuthError, UntrustedOriginError, useAuth, useAuthClient, useAuthorizedFetch, useLoginMethods, usePasskeySupport, };
|
|
13
|
+
export { AuthProvider, createSeamlessAuthClient, encodePrfSalt, extractPasskeyPrfResult, getOAuthErrorCode, getPasskeyPolicyErrorCode, getWebAuthnErrorDetail, hasNonPasskeyLoginMethod, hasScopedRole, isPasskeyPrfSupported, isUnauthenticated, roleGrantsAccess, SeamlessAuthError, UntrustedOriginError, UntrustedRedirectError, useAuth, useAuthClient, useAuthorizedFetch, useLoginMethods, usePasskeySupport, };
|
|
14
14
|
export type { CredentialUpdateResult, AuthContextType, AuthPorts, Credential, CreateOrganizationInput, CurrentUserResult, FinishOAuthLoginInput, FinishOAuthLoginResult, InitialSession, LoginInput, LoginMethod, LoginStartResult, MessageResult, OAuthErrorCode, OAuthProvider, OAuthProvidersResult, OAuthRedirectOutcome, OAuthRedirectPort, Organization, OrganizationMemberInput, OrganizationMembership, OrganizationMemberUpdateInput, OrganizationMembersResult, OrganizationMembershipResult, OrganizationResult, OrganizationSwitchResult, OrganizationsResult, PasskeyLoginData, PasskeyAttachment, PasskeyMetadata, PasskeyPolicyErrorCode, PasskeyPort, PasskeyPrfInput, PasskeyPrfResult, PasskeyRegistrationData, PublicSystemConfigResult, RefreshSessionOptions, RegisterInput, RegisterPasskeyOptions, SeamlessAuthClient, SeamlessAuthClientOptions, SeamlessAuthResult, StartOAuthLoginInput, StartOAuthLoginResult, StepUpMethod, StepUpStatus, StepUpPrfData, StoredTokens, TokenStoragePort, TotpEnrollmentStartResult, TotpStatus, TransportOptions, UpdateOrganizationInput, User, WebAuthnErrorDetail, };
|
package/dist/index.js
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
'use client';
|
|
2
|
-
import{u as e}from"./chunks/shared-DbQnDPUA.js";export{A as AuthProvider,a as useAuthClient,b as useLoginMethods,c as usePasskeySupport}from"./chunks/shared-DbQnDPUA.js";export{SeamlessAuthError,UntrustedOriginError,createSeamlessAuthClient,encodePrfSalt,extractPasskeyPrfResult,getOAuthErrorCode,getPasskeyPolicyErrorCode,getWebAuthnErrorDetail,hasNonPasskeyLoginMethod,hasScopedRole,isPasskeyPrfSupported,isUnauthenticated,roleGrantsAccess}from"@seamless-auth/client";import"react";import"react/jsx-runtime";const r=()=>e().client.authorizedFetch;export{e as useAuth,r as useAuthorizedFetch};
|
|
2
|
+
import{u as e}from"./chunks/shared-DbQnDPUA.js";export{A as AuthProvider,a as useAuthClient,b as useLoginMethods,c as usePasskeySupport}from"./chunks/shared-DbQnDPUA.js";export{SeamlessAuthError,UntrustedOriginError,UntrustedRedirectError,createSeamlessAuthClient,encodePrfSalt,extractPasskeyPrfResult,getOAuthErrorCode,getPasskeyPolicyErrorCode,getWebAuthnErrorDetail,hasNonPasskeyLoginMethod,hasScopedRole,isPasskeyPrfSupported,isUnauthenticated,roleGrantsAccess}from"@seamless-auth/client";import"react";import"react/jsx-runtime";const r=()=>e().client.authorizedFetch;export{e as useAuth,r as useAuthorizedFetch};
|
|
3
3
|
//# sourceMappingURL=index.js.map
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":["../src/hooks/useAuthorizedFetch.ts"],"sourcesContent":[null],"names":["useAuthorizedFetch","useAuth","client","authorizedFetch"],"mappings":";
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../src/hooks/useAuthorizedFetch.ts"],"sourcesContent":[null],"names":["useAuthorizedFetch","useAuth","client","authorizedFetch"],"mappings":";qhBAaO,MAAMA,EAAqB,IAAMC,IAAUC,OAAOC"}
|
package/dist/routes.js
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
'use client';
|
|
2
|
-
import{jsxs as e,jsx as r,Fragment as o}from"react/jsx-runtime";import{useHref as a,useNavigate as n,useLocation as i,useSearchParams as s,Routes as t,Route as l,Navigate as c}from"react-router-dom";import{u as d,a as _,c as m,b as u}from"./chunks/shared-DbQnDPUA.js";import{useState as g,useEffect as p,useRef as f}from"react";import{fallbackSignInOptions as h,hasFallbackSignInOption as b,OAUTH_CALLBACK_PATH as v,startOAuthSignIn as y,isValidEmail as k,isValidPhoneNumber as x,beginSignIn as w,PASSKEY_SIGN_IN_FAILED as N,registerWithEmail as P,safeReturnPath as C,hasNonPasskeyLoginMethod as M,enrollPasskey as O,isOtpCharacter as T,otpCharacters as I,OTP_LIFETIME_SECONDS as S,formatCountdown as B,OTP_LENGTH as z,verifyOtp as L,requestOtp as A,otpResendFailedMessage as q,finishMagicLinkSignIn as R,completeOAuthCallback as E,MAGIC_LINK_RESEND_COOLDOWN_SECONDS as j,watchMagicLink as F}from"@seamless-auth/client";const D="/login",G="/passkey-login",V="/verify-phone-otp",K="/verify-email-otp",U="/verify-magiclink",W="/oauth/callback",Y="/register-passkey",J="/magic-link-sent";function H(e,r){void 0===r&&(r={});var o=r.insertAt;if(e&&"undefined"!=typeof document){var a=document.head||document.getElementsByTagName("head")[0],n=document.createElement("style");n.type="text/css","top"===o&&a.firstChild?a.insertBefore(n,a.firstChild):a.appendChild(n),n.styleSheet?n.styleSheet.cssText=e:n.appendChild(document.createTextNode(e))}}var Q="login-module__container___YggDx",X="login-module__card___Ub-Py",Z="login-module__heading___neEqb",$="login-module__inputGroup___P6qgS",ee="login-module__label___mx5vu",re="login-module__input___U07lW",oe="login-module__helperText___kDQ4-",ae="login-module__error___40zxh",ne="login-module__button___0kFBs",ie="login-module__submitHint___qOS5Z",se="login-module__toggle___1JiG1",te="login-module__fallbackCard___HdIk-",le="login-module__fallbackHeader___-il2v",ce="login-module__fallbackDescription___ea5EB",de="login-module__fallbackActions___AD3ni",_e="login-module__fallbackActionButton___lFgWf",me="login-module__actionTitle___ycrMp",ue="login-module__actionSubtext___opaIV",ge="login-module__linkButton___5lsoe";H(".login-module__container___YggDx{align-items:center;color:var(--seamless-text,#fff);display:flex;justify-content:center}.login-module__card___Ub-Py{background-color:var(--seamless-surface,#1f2937);border-radius:.5rem;box-shadow:0 4px 6px var(--seamless-shadow,rgba(0,0,0,.1));max-width:28rem;padding:2rem;width:100%}.login-module__heading___neEqb{color:var(--seamless-text,#fff);font-size:1.5rem;font-weight:700;margin-bottom:1.5rem;text-align:center}.login-module__message___qSejT{color:var(--seamless-success,#68d391);text-align:center}.login-module__inputGroup___P6qgS{margin-bottom:1rem}.login-module__label___mx5vu{color:var(--seamless-text-muted,#d1d5db);display:block}.login-module__input___U07lW{background-color:var(--seamless-surface-raised,#4b5563);border:1px solid var(--seamless-border,#d1d5db);border-radius:.375rem;margin-top:.25rem;padding:.5rem;width:100%}.login-module__input___U07lW:focus{box-shadow:0 0 0 2px var(--seamless-accent,#3b82f6);outline:none}.login-module__helperText___kDQ4-{color:var(--seamless-text-muted,#9ca3af);font-size:.75rem;margin-top:.5rem}.login-module__error___40zxh{color:var(--seamless-danger,#f87171);font-size:.875rem}.login-module__button___0kFBs{background-color:var(--seamless-accent,#2563eb);border-radius:.375rem;color:var(--seamless-accent-contrast,#fff);cursor:pointer;margin-top:1rem;padding:.5rem;transition:background-color .3s,opacity .3s;width:100%}.login-module__button___0kFBs:hover:not(:disabled){background-color:var(--seamless-accent-hover,#1d4ed8)}.login-module__button___0kFBs:disabled{cursor:not-allowed;opacity:.6}.login-module__submitHint___qOS5Z{color:var(--seamless-text-muted,#9ca3af);font-size:.75rem;margin-top:.5rem;text-align:center}.login-module__toggle___1JiG1{background:none;border:none;color:var(--seamless-accent-soft,#60a5fa);cursor:pointer;font-size:.875rem;margin-top:1.5rem;text-align:center;width:100%}.login-module__underline___gs-RS{text-decoration:underline}.login-module__phoneRow___oeNtq{display:grid;gap:.5rem;grid-template-columns:1fr 3fr;margin-top:.25rem}.login-module__phoneInput___2MPQC,.login-module__select___rRV1O{background-color:var(--seamless-surface-raised,#4b5563);border:1px solid var(--seamless-border,#d1d5db);border-radius:.375rem;padding:.5rem;width:100%}@media (max-width:500px){.login-module__phoneRow___oeNtq{grid-template-columns:1fr}}.login-module__fallbackCard___HdIk-{background:var(--seamless-surface-raised,hsla(0,0%,100%,.04));border:1px solid var(--seamless-border,hsla(0,0%,100%,.08));border-radius:12px;display:flex;flex-direction:column;gap:14px;margin-top:18px;padding:18px}.login-module__fallbackHeader___-il2v{color:var(--seamless-text,#f3f4f6);font-size:.95rem;font-weight:600}.login-module__fallbackDescription___ea5EB{color:var(--seamless-text-muted,#9ca3af);font-size:.85rem;line-height:1.4}.login-module__fallbackActions___AD3ni{display:flex;flex-direction:column;gap:10px}.login-module__fallbackActionButton___lFgWf{background:var(--seamless-surface,rgba(0,0,0,.25));border:1px solid var(--seamless-border,hsla(0,0%,100%,.08));border-radius:8px;cursor:pointer;display:flex;flex-direction:column;padding:12px 14px;text-align:left;transition:all .15s ease}.login-module__fallbackActionButton___lFgWf:hover{background:var(--seamless-surface-hover,hsla(0,0%,100%,.06));border-color:var(--seamless-border,hsla(0,0%,100%,.15))}.login-module__actionTitle___ycrMp{color:var(--seamless-text,#f9fafb);font-size:.9rem;font-weight:500}.login-module__actionSubtext___opaIV{color:var(--seamless-text-muted,#9ca3af);font-size:.75rem;margin-top:2px}.login-module__linkButton___5lsoe{background:none;border:none;color:var(--seamless-accent-soft,#60a5fa);cursor:pointer;font-size:.8rem;margin-top:6px}.login-module__linkButton___5lsoe:hover{text-decoration:underline}");const pe=({identifier:o,onMagicLink:a,onEmailOtp:n,onPhoneOtp:i,onPasskeyRetry:s,loginMethods:t})=>{const l=h(o,t,{emailOtp:Boolean(n),passkeyRetry:Boolean(s)});return b(l)?e("div",{className:te,children:[r("div",{className:le,children:"Choose a sign-in method"}),r("p",{className:ce,children:"Choose another secure sign-in method."}),e("div",{className:de,children:[l.magicLink&&e("button",{type:"button",className:_e,onClick:a,children:[r("span",{className:me,children:"Email Magic Link"}),r("span",{className:ue,children:"Send a secure sign-in link to your email"})]}),l.emailOtp&&e("button",{type:"button",className:_e,onClick:n,children:[r("span",{className:me,children:"Email Code"}),r("span",{className:ue,children:"Receive a one-time code by email"})]}),l.phoneOtp&&e("button",{type:"button",className:_e,onClick:i,children:[r("span",{className:me,children:"Text Message Code"}),r("span",{className:ue,children:"Receive a one-time code via SMS"})]})]}),l.passkeyRetry&&r("button",{type:"button",className:ge,onClick:s,children:"Try passkey anyway"})]}):null},fe=()=>{const{listOAuthProviders:o,startOAuthLogin:n,finishOAuthLogin:i,ports:s}=d(),t=a(v),[l,c]=g([]),[_,m]=g("");if(p(()=>{let e=!0;return o().then(({data:r})=>{e&&c(r?.providers??[])}),()=>{e=!1}},[o]),0===l.length)return null;return e("div",{className:de,children:[l.map(o=>r("button",{type:"button",className:_e,onClick:()=>(async e=>{m("");const r=new URL(t,window.location.origin).toString(),{error:o}=await y({actions:{startOAuthLogin:n,finishOAuthLogin:i},oauthRedirect:s.oauthRedirect},{providerId:e,redirectUri:r});o&&m(o)})(o.id),children:e("span",{className:me,children:["Continue with ",o.name]})},o.id)),_&&r("p",{className:ae,children:_})]})},he=()=>{const a=n(),{hasSignedInBefore:i,login:s,handlePasskeyLogin:t}=d(),l=_(),{passkeySupported:c}=m(),{loginMethods:f}=u(),[h,b]=g(""),[v,y]=g(""),[C,M]=g("register"),[O,T]=g(""),[I,S]=g(""),[B,z]=g(""),[L,A]=g(!1),[q,R]=g(null);p(()=>{i&&M("login")},[i]);const E=()=>"login"===C?k(h)||x(h):k(v);return r("div",{className:Q,children:e("div",{className:X,children:[r("h2",{className:Z,children:"login"===C?"Sign In":"Create Account"}),e(o,{children:[e("form",{onSubmit:async e=>{e.preventDefault(),T(""),A(!1);try{if("login"===C){const e=await w({login:s,handlePasskeyLogin:t},{identifier:h,passkeySupported:c,configuredMethods:f});return"error"===e.kind?void T(e.message):"signed_in"===e.kind?void a("/"):(R(e.loginMethods),A(!0),void(e.passkeyFailed&&T(N)))}"register"===C&&await(async()=>{T("");const{error:e}=await P(l,v);e?T(e):a(K)})()}catch{console.error("Failed to continue sign-in."),T("Failed to continue sign-in. Please try again.")}},children:["login"===C&&e("div",{className:$,children:[r("label",{htmlFor:"identifier",className:ee,children:"Email Address / Phone Number"}),r("input",{id:"identifier",type:"text",value:h,onChange:e=>{const r=e.target.value;b(r)},autoComplete:"off",placeholder:"Email or Phone Number",className:re,onBlur:()=>{if(h){const e=k(h)||x(h);z(e?"":"Please enter a valid email or phone number")}},required:!0}),r("p",{className:oe,children:"Phone numbers must include a country code e.g. +1"}),L&&r(pe,{identifier:h,onMagicLink:async()=>{const{error:e}=await l.requestMagicLink();e?T("Failed to send magic link."):a(J,{state:{identifier:h}})},onEmailOtp:async()=>{const{error:e}=await l.requestLoginEmailOtp();e?T("Failed to send email code."):a(K,{state:{flow:"login"}})},onPhoneOtp:async()=>{const{error:e}=await l.requestLoginPhoneOtp();e?T("Failed to send OTP."):a(V,{state:{flow:"login"}})},onPasskeyRetry:c?t:void 0,loginMethods:q}),B&&r("p",{className:ae,children:B})]}),"register"===C&&e("div",{className:$,children:[r("label",{htmlFor:"email",className:ee,children:"Email Address"}),r("input",{id:"email",type:"email",value:v,onChange:e=>{const r=e.target.value;y(r)},autoComplete:"off",className:re,onBlur:()=>{if(v){const e=k(v);S(e?"":"Please enter a valid email")}},required:!0}),I&&r("p",{className:ae,children:I})]}),r("button",{type:"submit",className:ne,disabled:!E(),"aria-describedby":"seamless-submit-hint",children:"login"===C?"Login":"Register"}),r("p",{id:"seamless-submit-hint",role:"status",className:ie,children:"login"===C?h?E()?"Ready to continue.":"This does not look like a complete email or phone number yet.":"Enter your email or phone number to continue.":v?E()?"Ready to continue.":"This does not look like a complete email address yet.":"Enter your email address to continue."}),O&&r("p",{className:ae,children:O}),r("button",{type:"button",onClick:()=>M("login"===C?"register":"login"),className:se,children:"login"===C?"Don't have an account? Create one":"Already have an account? Sign in"})]}),r(fe,{})]})]})})};var be={container:"passKeyLogin-module__container___IUKxF",card:"passKeyLogin-module__card___2sKM1",title:"passKeyLogin-module__title___HZxvc",button:"passKeyLogin-module__button___FvR4I"};H(".passKeyLogin-module__container___IUKxF{align-items:center;color:var(--seamless-text,#fff);display:flex;justify-content:center;padding:1rem}.passKeyLogin-module__card___2sKM1{background-color:var(--seamless-surface,#1f2937);border-radius:1rem;box-shadow:0 4px 20px var(--seamless-shadow,rgba(0,0,0,.4));display:flex;flex-direction:column;gap:1.5rem;max-width:400px;padding:2rem;width:100%}.passKeyLogin-module__title___HZxvc{color:var(--seamless-text,#fff);font-size:1.5rem;font-weight:600;text-align:center}.passKeyLogin-module__button___FvR4I{background-color:var(--seamless-accent,#2563eb);border:1px solid var(--seamless-accent,#3b82f6);border-radius:.5rem;color:var(--seamless-accent-contrast,#fff);cursor:pointer;font-weight:500;padding:.75rem 1rem;text-align:center;transition:background-color .2s ease;width:100%}.passKeyLogin-module__button___FvR4I:hover{background-color:var(--seamless-accent-hover,#1d4ed8)}@media (max-width:480px){.passKeyLogin-module__card___2sKM1{padding:1.25rem}.passKeyLogin-module__button___FvR4I{font-size:1rem}}");const ve=()=>{const o=n(),{handlePasskeyLogin:a}=d(),[i,s]=g("");return r("div",{className:be.container,children:e("div",{className:be.card,children:[r("h2",{className:be.title,children:"Login with Passkey"}),r("button",{onClick:async()=>{s("");const{error:e}=await a();e?s("Passkey sign-in could not be completed. Try another sign-in method."):o("/")},className:be.button,children:"Use Passkey"}),i&&r("p",{className:be.error,children:i})]})})};var ye="registerPasskey-module__container___jqEh8",ke="registerPasskey-module__card___MJAyC",xe="registerPasskey-module__loading___Q4i1x",we="registerPasskey-module__spinner___V1nhd",Ne="registerPasskey-module__supported___ihTih",Pe="registerPasskey-module__title___vn2Qu",Ce="registerPasskey-module__description___AWmO-",Me="registerPasskey-module__button___D3b4B",Oe="registerPasskey-module__message___RiOw-",Te="registerPasskey-module__success___HP5aX",Ie="registerPasskey-module__error___hGiqE",Se="registerPasskey-module__skip___1hDyU",Be="registerPasskey-module__secondary___bnOB4";H(".registerPasskey-module__container___jqEh8{align-items:center;color:var(--seamless-text,#fff);display:flex;justify-content:center;padding:1rem}.registerPasskey-module__card___MJAyC{background-color:var(--seamless-surface,#1f2937);border-radius:1rem;box-shadow:0 4px 20px var(--seamless-shadow,rgba(0,0,0,.4));max-width:400px;padding:1.5rem;width:100%}.registerPasskey-module__loading___Q4i1x{align-items:center;background-color:var(--seamless-surface,#f9fafb);border-radius:.75rem;box-shadow:0 2px 8px var(--seamless-shadow,rgba(0,0,0,.1));color:var(--seamless-text,#374151);display:flex;font-weight:500;gap:.75rem;justify-content:center;padding:1.5rem}.registerPasskey-module__spinner___V1nhd{animation:registerPasskey-module__spin___oYcsC 1s linear infinite;border-bottom:2px solid var(--seamless-accent,#3b82f6);border-left:2px solid transparent;border-radius:9999px;border-right:2px solid transparent;border-top:2px solid var(--seamless-accent,#3b82f6);height:1.5rem;width:1.5rem}@keyframes registerPasskey-module__spin___oYcsC{to{transform:rotate(1turn)}}.registerPasskey-module__supported___ihTih{background-color:var(--seamless-surface,#ecfdf5);border-radius:.75rem;box-shadow:0 2px 12px var(--seamless-shadow,rgba(0,0,0,.1));color:var(--seamless-text,#065f46);padding:1.25rem}.registerPasskey-module__title___vn2Qu{font-size:1.125rem;font-weight:600;margin-bottom:.5rem}.registerPasskey-module__description___AWmO-{margin-bottom:1rem}.registerPasskey-module__button___D3b4B{background-color:var(--seamless-accent,#059669);border:none;border-radius:.5rem;color:var(--seamless-accent-contrast,#fff);cursor:pointer;font-weight:500;padding:.75rem 1rem;transition:background-color .2s ease;width:100%}.registerPasskey-module__button___D3b4B:hover{background-color:var(--seamless-accent-hover,#047857)}.registerPasskey-module__message___RiOw-{font-size:.875rem;margin-top:1rem}.registerPasskey-module__success___HP5aX{color:var(--seamless-success,#6ee7b7)}.registerPasskey-module__error___hGiqE{color:var(--seamless-danger,#f87171)}.registerPasskey-module__skip___1hDyU{background:none;border:none;color:var(--seamless-accent-soft,#60a5fa);cursor:pointer;font-size:.875rem;margin-top:1.5rem;text-align:center;width:100%}.registerPasskey-module__skip___1hDyU:disabled{cursor:default;opacity:.6}.registerPasskey-module__secondary___bnOB4{background:none;border:1px solid var(--seamless-accent,#059669);border-radius:.5rem;color:var(--seamless-accent,#059669);cursor:pointer;font-weight:500;margin-top:.75rem;padding:.75rem 1rem;transition:background-color .2s ease;width:100%}.registerPasskey-module__secondary___bnOB4:hover:not(:disabled){background-color:var(--seamless-accent-muted,rgba(5,150,105,.1))}.registerPasskey-module__secondary___bnOB4:disabled{cursor:default;opacity:.6}");const ze=()=>{const{refreshSession:o}=d(),a=_(),{passkeySupported:s,loading:t}=m(),{loginMethods:l,loading:c}=u(),p=n(),f=C(i().state?.returnTo),[h,b]=g("idle"),[v,y]=g(""),k=M(l),x=async()=>{await o(),p(f)},w=async e=>{b("loading");const{error:r}=await O({client:a,refreshSession:o},e);if(r)return b("error"),void y(r);b("success"),y("Passkey registered successfully."),p(f)};return r("div",{className:ye,children:r("div",{className:ke,children:e("div",t||c?{className:xe,children:[r("div",{className:we}),r("span",{children:"Checking for Passkey Support..."})]}:s?{className:Ne,children:[r("h2",{className:Pe,children:"Secure Your Account with a Passkey"}),r("p",{className:Ce,children:"Your device supports passkeys! Register one to skip passwords forever."}),r("button",{onClick:()=>w(),disabled:"loading"===h,className:Me,children:"loading"===h?"Registering...":"Register Passkey"}),r("button",{type:"button",onClick:()=>w("cross-platform"),disabled:"loading"===h,className:Be,children:"Use a security key instead"}),v&&r("p",{className:`${Oe} ${"success"===h?Te:Ie}`,children:v}),k&&r("button",{type:"button",onClick:x,disabled:"loading"===h,className:Se,children:"Skip for now"})]}:{className:Ne,children:[r("h2",{className:Pe,children:"Passkeys are not available here"}),r("p",{className:Ce,children:k?"This device does not support passkeys. You can continue without one and add a passkey later from a device that does.":"This device does not support passkeys, and this application requires one to sign in. Try again from a device or browser that supports them."}),k&&r("button",{type:"button",onClick:x,className:Me,children:"Continue"})]})})})};var Le="verifyOTP-module__container___wgoDE",Ae="verifyOTP-module__card___3cs2p",qe="verifyOTP-module__title___fZ-1d",Re="verifyOTP-module__subtitle___dGSu3",Ee="verifyOTP-module__error___GEtlG",je="verifyOTP-module__success___46TjG",Fe="verifyOTP-module__form___jiGG-",De="verifyOTP-module__label___Zq5Mi",Ge="verifyOTP-module__timer___smq-a",Ve="verifyOTP-module__resend___PlmkG",Ke="verifyOTP-module__button___8pIuO",Ue="verifyOTP-module__toggle___wbzVa";H(".verifyOTP-module__container___wgoDE{align-items:center;color:var(--seamless-text,#fff);display:flex;justify-content:center;padding:1rem}.verifyOTP-module__card___3cs2p{background-color:var(--seamless-surface,#1f2937);border-radius:.5rem;box-shadow:0 0 10px var(--seamless-shadow,rgba(0,0,0,.3));max-width:28rem;padding:1.5rem;width:100%}.verifyOTP-module__title___fZ-1d{color:var(--seamless-text,#fff);font-size:1.5rem;font-weight:700;margin-bottom:1rem;text-align:center}.verifyOTP-module__subtitle___dGSu3{color:var(--seamless-text-muted,#9ca3af);font-size:.875rem;margin-bottom:1.5rem;text-align:center}.verifyOTP-module__error___GEtlG{color:var(--seamless-danger,#f87171);margin-bottom:1rem;text-align:center}.verifyOTP-module__success___46TjG{color:var(--seamless-success,#34d399);margin-bottom:.75rem;text-align:center}.verifyOTP-module__form___jiGG-{display:flex;flex-direction:column;gap:1rem}.verifyOTP-module__label___Zq5Mi{color:var(--seamless-text-muted,#d1d5db);display:block;font-size:.875rem;margin-bottom:.25rem}.verifyOTP-module__timer___smq-a{color:var(--seamless-warning,#facc15);font-size:.875rem}.verifyOTP-module__input___yqIXM{background-color:var(--seamless-surface-raised,#374151);border:1px solid var(--seamless-border,#4b5563);border-radius:.375rem;color:var(--seamless-text,#fff);outline:none;padding:.5rem;width:100%}.verifyOTP-module__input___yqIXM:focus{box-shadow:0 0 0 2px var(--seamless-accent,#3b82f6)}.verifyOTP-module__resend___PlmkG{background:none;border:none;color:var(--seamless-accent-soft,#60a5fa);cursor:pointer;font-size:.75rem;margin-top:.25rem;text-decoration:underline}.verifyOTP-module__resend___PlmkG:hover{color:var(--seamless-accent,#3b82f6)}.verifyOTP-module__button___8pIuO{background-color:var(--seamless-accent,#2563eb);border:none;border-radius:.375rem;color:var(--seamless-accent-contrast,#fff);cursor:pointer;padding:.5rem;transition:background-color .2s;width:100%}.verifyOTP-module__button___8pIuO:hover{background-color:var(--seamless-accent-hover,#1d4ed8)}.verifyOTP-module__toggle___wbzVa{background:none;border:none;color:var(--seamless-accent-soft,#60a5fa);cursor:pointer;font-size:.875rem;margin-top:1.5rem;text-align:center;width:100%}");var We="otpInput-module__otpContainer___MUjby",Ye="otpInput-module__otpInput___3YMVm";H(".otpInput-module__otpContainer___MUjby{display:flex;gap:8px;justify-content:center;margin-top:8px}.otpInput-module__otpInput___3YMVm{background:var(--seamless-surface-raised,#374151);border:1px solid var(--seamless-border,#4b5563);border-radius:8px;color:var(--seamless-text,#fff);font-size:1.2rem;height:48px;text-align:center;transition:border-color .15s ease,box-shadow .15s ease;width:42px}.otpInput-module__otpInput___3YMVm:focus{border-color:var(--seamless-accent,#60a5fa);box-shadow:0 0 0 2px var(--seamless-accent,rgba(96,165,250,.25));outline:none}");const Je=({length:e=6,value:o,inputMode:a="numeric",onChange:n,name:i="otp"})=>{const s=f([]),t=o.split("").concat(Array(e).fill("")).slice(0,e),l=(r,o)=>{const i=I(o,a).slice(0,e),l=[...t];i.forEach((o,a)=>{r+a<e&&(l[r+a]=o)}),n(l.join("")),s.current[Math.min(r+i.length,e-1)]?.focus()};return r("div",{className:We,role:"group","aria-label":"One-time password input",onPaste:e=>{e.preventDefault(),l(0,e.clipboardData.getData("text"))},children:t.map((o,c)=>r("input",{ref:e=>s.current[c]=e,type:"text",inputMode:"numeric"===a?"numeric":"text",autoComplete:"one-time-code",name:`${i}-${c}`,maxLength:1,value:o,className:Ye,onChange:e=>((e,r)=>{if(r.length>1)l(e,r);else if(!r||T(r,a)){const o=[...t];o[e]=r;const a=o.join("");n(a),r&&s.current[e+1]&&s.current[e+1]?.focus()}})(c,e.target.value),onKeyDown:r=>((r,o)=>{if("Backspace"===o.key){o.preventDefault();const e=[...t];t[r]?(e[r]="",n(e.join(""))):r>0&&(e[r-1]="",n(e.join("")),s.current[r-1]?.focus())}"ArrowLeft"===o.key&&r>0&&s.current[r-1]?.focus(),"ArrowRight"===o.key&&r<e-1&&s.current[r+1]?.focus()})(c,r),"aria-label":`Digit ${c+1}`},c))})},He=()=>{const o=n(),a=i(),{refreshSession:s}=d(),t="login"===a.state?.flow,[l,c]=g(""),[m,u]=g(null),[f,h]=g(""),[b,v]=g(!1),[y,k]=g(""),[x,w]=g(S),N=_(),P=async()=>{if(m)return;const{next:e,error:r}=await L({client:N,refreshSession:s},{channel:"phone",flow:t?"login":"register",code:l});if(null===r)return"verify_email"===e?(u(!0),void o(K)):void o("/");h(r)},C=async()=>{k(""),await(async()=>{h("");const{error:e}=await A(N,"phone",t?"login":"register");e?h(q("phone")):k("Verification SMS has been resent.")})(),k("Verification SMS has been resent.")};return p(()=>{const e=setInterval(()=>{w(e=>e>0?e-1:0)},1e3);return()=>clearInterval(e)},[]),r("div",{className:Le,children:e("div",{className:Ae,children:[r("h2",{className:qe,children:"Verify Your Phone Number"}),r("p",{className:Re,children:"Enter the code sent to your phone number."}),f&&r("p",{className:Ee,children:f}),y&&r("p",{className:je,children:y}),e("form",{onSubmit:async e=>{if(e.preventDefault(),h(""),l.length===z){v(!0);try{await P()}catch{h("Unexpected error occurred.")}finally{v(!1)}}else h("Please enter a valid code.")},className:Fe,children:[e("div",{children:[e("label",{htmlFor:"phoneCode",className:De,children:["Phone Verification Code ",(M=m,!0===M?r("span",{className:"text-green-400 ml-2",children:"✅"}):!1===M?r("span",{className:"text-red-400 ml-2",children:"❌"}):null)," -"," ",e("span",{className:Ge,children:["Code expires in: ",B(x)]})]}),r(Je,{length:6,value:l,onChange:c}),r("button",{type:"button",onClick:()=>C(),className:Ve,children:"Resend code to phone"})]}),r("button",{type:"submit",className:Ke,children:b?"Verifying...":"Verify & Continue"}),r("button",{type:"button",onClick:()=>o("/login"),className:Ue,children:"Back to login"})]})]})});var M},Qe=()=>{const o=n(),a=i(),{refreshSession:s}=d(),t=_(),{passkeySupported:l}=m(),c="login"===a.state?.flow,[u,f]=g(!1),[h,b]=g(""),[v,y]=g(S),[k,x]=g(""),[w,N]=g("");return p(()=>{const e=setInterval(()=>{y(e=>e>0?e-1:0)},1e3);return()=>clearInterval(e)},[]),r("div",{className:Le,children:e("div",{className:Ae,children:[r("h2",{className:qe,children:"Verify Your Email"}),r("p",{className:Re,children:"We sent you a verification email. Enter the code below."}),k&&r("p",{className:Ee,children:k}),w&&r("p",{className:je,children:w}),e("form",{onSubmit:async e=>{if(e.preventDefault(),x(""),h.length===z){f(!0);try{const{next:e,error:r}=await L({client:t,refreshSession:s},{channel:"email",flow:c?"login":"register",code:h,passkeySupported:l});if(null!==r)return void x(r);o("register_passkey"===e?Y:"/")}catch{console.error("Email OTP verification failed."),x("Verification failed.")}finally{f(!1)}}else x("Please enter a valid code.")},className:Fe,children:[e("div",{children:[e("label",{htmlFor:"emailCode",className:De,children:["Email Verification Code",e("span",{className:Ge,children:[" ","— Code expires in ",B(v)]})]}),r(Je,{length:6,value:h,onChange:b,inputMode:"text"}),r("button",{type:"button",onClick:async()=>{x(""),N("");const{error:e}=await A(t,"email",c?"login":"register");e?x(q("email")):N("Verification email has been resent.")},className:Ve,children:"Resend code to email"})]}),r("button",{type:"submit",className:Ke,disabled:u,children:u?"Verifying...":"Verify & Continue"}),r("button",{type:"button",onClick:()=>o("/login"),className:Ue,children:"Back to login"})]})]})})};var Xe={container:"verifyMagiclink-module__container___qrSXf",card:"verifyMagiclink-module__card___niKgr",title:"verifyMagiclink-module__title___SumxD",verificationContent:"verifyMagiclink-module__verificationContent___NdsS0",spinner:"verifyMagiclink-module__spinner___lnW1k",successIcon:"verifyMagiclink-module__successIcon___XjFEM",checkIcon:"verifyMagiclink-module__checkIcon___I0JOP",successText:"verifyMagiclink-module__successText___lO5Qq"};H(".verifyMagiclink-module__container___qrSXf{align-items:center;color:var(--seamless-text,#fff);display:flex;justify-content:center;padding:1rem}.verifyMagiclink-module__card___niKgr{background-color:var(--seamless-surface,#1f2937);border-radius:.5rem;box-shadow:0 0 10px var(--seamless-shadow,rgba(0,0,0,.3));max-width:28rem;padding:1.5rem;width:100%}.verifyMagiclink-module__title___SumxD{color:var(--seamless-text,#fff);font-size:1.5rem;font-weight:700;margin-bottom:1rem;text-align:center}.verifyMagiclink-module__verificationContent___NdsS0{align-items:center;display:flex;flex-direction:column;gap:14px;margin:20px 0}.verifyMagiclink-module__spinner___lnW1k{animation:verifyMagiclink-module__spin___2lGzj .9s linear infinite;border:3px solid var(--seamless-border,hsla(0,0%,100%,.15));border-radius:50%;border-top-color:var(--seamless-accent,#60a5fa);height:28px;width:28px}.verifyMagiclink-module__successIcon___XjFEM{align-items:center;background:rgba(16,185,129,.15);border-radius:50%;display:flex;height:36px;justify-content:center;width:36px}.verifyMagiclink-module__checkIcon___I0JOP{animation:verifyMagiclink-module__checkPop___-3qJu .25s ease-out;color:var(--seamless-success,#34d399);height:22px;width:22px}.verifyMagiclink-module__successText___lO5Qq{color:var(--seamless-success,#34d399);font-size:.9rem}@keyframes verifyMagiclink-module__checkPop___-3qJu{0%{opacity:0;transform:scale(.6)}80%{transform:scale(1.15)}to{opacity:1;transform:scale(1)}}@keyframes verifyMagiclink-module__spin___2lGzj{to{transform:rotate(1turn)}}");const Ze=()=>{const[o]=s(),a=n(),i=o.get("token"),[t,l]=g(""),[c,m]=g(null),u=_(),{refreshSession:h}=d(),b=f(null);return p(()=>{let e=!0,r=null;return(async()=>{if(!i)return e&&l("Missing token for verification."),void console.error("No magic-link token found.");b.current?.token!==i&&(b.current={token:i,result:u.verifyMagicLink(i)});const{error:o}=await b.current.result;if(!e)return;if(o)return console.error("Failed to verify token"),void l("Failed to verify token");const n=await R({client:u,refreshSession:h});e&&(m(n),"elsewhere"!==n&&(r=setTimeout(()=>{e&&a("/")},900)))})(),()=>{e=!1,r&&clearTimeout(r)}},[i,u,a,h]),r("div",{className:Xe.container,children:e("div",{className:Xe.card,children:[r("h1",{className:Xe.title,children:"Verifying your login"}),e("div",{className:Xe.verificationContent,children:[!c&&!t&&r("div",{className:Xe.spinner}),c&&r("div",{className:Xe.successIcon,children:r("svg",{viewBox:"0 0 24 24",className:Xe.checkIcon,fill:"none",stroke:"currentColor",strokeWidth:"2",children:r("path",{d:"M5 13l4 4L19 7"})})}),!c&&!t&&r("p",{className:Xe.helperText,children:"Please wait while we securely verify your sign-in link."}),"signed-in"===c&&r("p",{className:Xe.successText,children:"Login verified. Redirecting…"}),"elsewhere"===c&&r("p",{className:Xe.successText,children:"Login verified. Return to the device where you requested this link to continue."}),t&&r("p",{className:Xe.error,children:t})]})]})})},$e=()=>{const{finishOAuthLogin:a}=d(),i=n(),[t]=s(),[l,c]=g(""),_=f(!1);return p(()=>{_.current||(_.current=!0,E({finishOAuthLogin:a},t,window.location.origin).then(e=>{"error"!==e.kind?"enroll_passkey"!==e.kind?i(e.destination):i(Y,{state:{returnTo:e.returnTo}}):c(e.message)}))},[a,i,t]),e("div",{className:Xe.container,children:[r("h2",{className:Xe.title,children:l?"Sign-in failed":"Completing sign-in..."}),l&&e(o,{children:[r("p",{children:l}),r("button",{type:"button",onClick:()=>i("/login"),children:"Back to login"})]})]})};var er="magiclink-module__container___45zcA",rr="magiclink-module__card___Au9oN",or="magiclink-module__iconWrapper___k5ndr",ar="magiclink-module__mailIcon___Pwb7q",nr="magiclink-module__iconRing___bdLvf",ir="magiclink-module__heading___b9cre",sr="magiclink-module__message___kiVFj",tr="magiclink-module__identifier___JtcFM",lr="magiclink-module__helperText___7Mlfh",cr="magiclink-module__actions___64I-3",dr="magiclink-module__secondaryButton___BntAI",_r="magiclink-module__cooldown___Ib4rm",mr="magiclink-module__linkButton___maJiv";H(".magiclink-module__container___45zcA{align-items:center;color:var(--seamless-text,#fff);display:flex;justify-content:center}.magiclink-module__card___Au9oN{background-color:var(--seamless-surface,#1f2937);border-radius:.75rem;box-shadow:0 10px 25px var(--seamless-shadow,rgba(0,0,0,.25));max-width:420px;padding:2.5rem 2rem;text-align:center;width:100%}.magiclink-module__iconWrapper___k5ndr{display:flex;justify-content:center;margin-bottom:1.25rem;position:relative}.magiclink-module__mailIcon___Pwb7q{color:var(--seamless-accent-soft,#a5b4fc);height:38px;width:38px;z-index:2}.magiclink-module__iconRing___bdLvf{animation:magiclink-module__pulse___YGm-I 2s infinite;background:rgba(99,102,241,.15);border-radius:50%;height:72px;position:absolute;width:72px}@keyframes magiclink-module__pulse___YGm-I{0%{opacity:.8;transform:scale(.6)}70%{opacity:0;transform:scale(1.4)}to{opacity:0}}.magiclink-module__heading___b9cre{font-size:1.55rem;font-weight:600;margin-bottom:.75rem}.magiclink-module__message___kiVFj{color:var(--seamless-text-muted,#d1d5db);font-size:.95rem;line-height:1.4;margin-bottom:1rem}.magiclink-module__identifier___JtcFM{background:var(--seamless-surface-raised,hsla(0,0%,100%,.05));border-radius:6px;display:inline-block;font-size:1rem;font-weight:600;margin-bottom:1rem;padding:.45rem .6rem}.magiclink-module__helperText___7Mlfh{color:var(--seamless-text-muted,#9ca3af);font-size:.85rem;line-height:1.4;margin-bottom:.6rem}.magiclink-module__actions___64I-3{display:flex;flex-direction:column;gap:.6rem;margin-top:1.6rem}.magiclink-module__secondaryButton___BntAI{background:var(--seamless-surface,#111827);border:1px solid var(--seamless-border,#374151);border-radius:8px;color:var(--seamless-text,#fff);cursor:pointer;font-weight:500;padding:.65rem}.magiclink-module__secondaryButton___BntAI:hover:not(:disabled){background:var(--seamless-surface-hover,#1f2937)}.magiclink-module__secondaryButton___BntAI:disabled{cursor:not-allowed;opacity:.5}.magiclink-module__cooldown___Ib4rm{color:var(--seamless-text-muted,#9ca3af);font-size:.8rem}.magiclink-module__linkButton___maJiv{background:none;border:none;color:var(--seamless-accent-soft,#a5b4fc);cursor:pointer;font-size:.85rem;margin-top:.4rem}.magiclink-module__linkButton___maJiv:hover{text-decoration:underline}");const ur=()=>{const{refreshSession:o}=d(),a=n(),s=i(),t=_(),l=s.state?.identifier,[c,m]=g(j);p(()=>{const e=setInterval(()=>{m(e=>e>0?e-1:0)},1e3);return()=>clearInterval(e)},[]);return p(()=>F({client:t,refreshSession:o,onSignedIn:()=>a("/")}),[t,a,o]),r("div",{className:er,children:e("div",{className:rr,children:[e("div",{className:or,children:[r("div",{className:nr}),e("svg",{className:ar,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.8",children:[r("path",{d:"M4 6h16v12H4z"}),r("path",{d:"m4 6 8 6 8-6"})]})]}),r("h2",{className:ir,children:"Check your email"}),r("p",{className:sr,children:"If an account exists for this address, we sent a secure sign-in link."}),l&&r("div",{className:tr,children:l}),r("p",{className:lr,children:"Open the email and click the link to finish signing in."}),r("p",{className:lr,children:"Didn’t receive anything? Check your spam folder or try creating a new account."}),e("div",{className:cr,children:[r("button",{className:dr,disabled:c>0,onClick:async()=>{c>0||(await t.requestMagicLink(),m(j))},children:"Resend link"}),c>0&&e("div",{className:_r,children:["Available in ",c,"s"]}),r("button",{className:mr,onClick:()=>a("/login"),children:"Change email or phone"})]})]})})},gr=()=>e(t,{children:[r(l,{path:D,element:r(he,{})}),r(l,{path:G,element:r(ve,{})}),r(l,{path:V,element:r(He,{})}),r(l,{path:K,element:r(Qe,{})}),r(l,{path:U,element:r(Ze,{})}),r(l,{path:W,element:r($e,{})}),r(l,{path:Y,element:r(ze,{})}),r(l,{path:J,element:r(ur,{})}),r(l,{path:"*",element:r(c,{to:D,replace:!0})})]});export{gr as AuthRoutes};
|
|
2
|
+
import{jsxs as e,jsx as r,Fragment as o}from"react/jsx-runtime";import{useHref as i,useNavigate as n,useLocation as a,useSearchParams as s,Routes as t,Route as l,Navigate as c}from"react-router-dom";import{u as d,a as _,c as m,b as u}from"./chunks/shared-DbQnDPUA.js";import{useState as g,useEffect as f,useRef as p}from"react";import{fallbackSignInOptions as h,hasFallbackSignInOption as v,OAUTH_CALLBACK_PATH as b,startOAuthSignIn as y,isValidEmail as k,isValidPhoneNumber as x,beginSignIn as w,PASSKEY_SIGN_IN_FAILED as N,registerWithEmail as P,safeReturnPath as M,hasNonPasskeyLoginMethod as T,enrollPasskey as C,isOtpCharacter as O,otpCharacters as B,OTP_LIFETIME_SECONDS as I,formatCountdown as S,OTP_LENGTH as z,verifyOtp as L,requestOtp as q,otpResendFailedMessage as A,magicLinkConfirmationPrompt as D,getMagicLinkConfirmation as R,finishMagicLinkSignIn as E,confirmMagicLinkSignIn as j,completeOAuthCallback as F,MAGIC_LINK_RESEND_COOLDOWN_SECONDS as G,watchMagicLink as V}from"@seamless-auth/client";const U="/login",K="/passkey-login",Y="/verify-phone-otp",W="/verify-email-otp",J="/verify-magiclink",H="/oauth/callback",Z="/register-passkey",Q="/magic-link-sent";function X(e,r){void 0===r&&(r={});var o=r.insertAt;if(e&&"undefined"!=typeof document){var i=document.head||document.getElementsByTagName("head")[0],n=document.createElement("style");n.type="text/css","top"===o&&i.firstChild?i.insertBefore(n,i.firstChild):i.appendChild(n),n.styleSheet?n.styleSheet.cssText=e:n.appendChild(document.createTextNode(e))}}var $="login-module__container___YggDx",ee="login-module__card___Ub-Py",re="login-module__heading___neEqb",oe="login-module__inputGroup___P6qgS",ie="login-module__label___mx5vu",ne="login-module__input___U07lW",ae="login-module__helperText___kDQ4-",se="login-module__error___40zxh",te="login-module__button___0kFBs",le="login-module__submitHint___qOS5Z",ce="login-module__toggle___1JiG1",de="login-module__fallbackCard___HdIk-",_e="login-module__fallbackHeader___-il2v",me="login-module__fallbackDescription___ea5EB",ue="login-module__fallbackActions___AD3ni",ge="login-module__fallbackActionButton___lFgWf",fe="login-module__actionTitle___ycrMp",pe="login-module__actionSubtext___opaIV",he="login-module__linkButton___5lsoe";X(".login-module__container___YggDx{align-items:center;color:var(--seamless-text,#fff);display:flex;justify-content:center}.login-module__card___Ub-Py{background-color:var(--seamless-surface,#1f2937);border-radius:.5rem;box-shadow:0 4px 6px var(--seamless-shadow,rgba(0,0,0,.1));max-width:28rem;padding:2rem;width:100%}.login-module__heading___neEqb{color:var(--seamless-text,#fff);font-size:1.5rem;font-weight:700;margin-bottom:1.5rem;text-align:center}.login-module__message___qSejT{color:var(--seamless-success,#68d391);text-align:center}.login-module__inputGroup___P6qgS{margin-bottom:1rem}.login-module__label___mx5vu{color:var(--seamless-text-muted,#d1d5db);display:block}.login-module__input___U07lW{background-color:var(--seamless-surface-raised,#4b5563);border:1px solid var(--seamless-border,#d1d5db);border-radius:.375rem;margin-top:.25rem;padding:.5rem;width:100%}.login-module__input___U07lW:focus{box-shadow:0 0 0 2px var(--seamless-accent,#3b82f6);outline:none}.login-module__helperText___kDQ4-{color:var(--seamless-text-muted,#9ca3af);font-size:.75rem;margin-top:.5rem}.login-module__error___40zxh{color:var(--seamless-danger,#f87171);font-size:.875rem}.login-module__button___0kFBs{background-color:var(--seamless-accent,#2563eb);border-radius:.375rem;color:var(--seamless-accent-contrast,#fff);cursor:pointer;margin-top:1rem;padding:.5rem;transition:background-color .3s,opacity .3s;width:100%}.login-module__button___0kFBs:hover:not(:disabled){background-color:var(--seamless-accent-hover,#1d4ed8)}.login-module__button___0kFBs:disabled{cursor:not-allowed;opacity:.6}.login-module__submitHint___qOS5Z{color:var(--seamless-text-muted,#9ca3af);font-size:.75rem;margin-top:.5rem;text-align:center}.login-module__toggle___1JiG1{background:none;border:none;color:var(--seamless-accent-soft,#60a5fa);cursor:pointer;font-size:.875rem;margin-top:1.5rem;text-align:center;width:100%}.login-module__underline___gs-RS{text-decoration:underline}.login-module__phoneRow___oeNtq{display:grid;gap:.5rem;grid-template-columns:1fr 3fr;margin-top:.25rem}.login-module__phoneInput___2MPQC,.login-module__select___rRV1O{background-color:var(--seamless-surface-raised,#4b5563);border:1px solid var(--seamless-border,#d1d5db);border-radius:.375rem;padding:.5rem;width:100%}@media (max-width:500px){.login-module__phoneRow___oeNtq{grid-template-columns:1fr}}.login-module__fallbackCard___HdIk-{background:var(--seamless-surface-raised,hsla(0,0%,100%,.04));border:1px solid var(--seamless-border,hsla(0,0%,100%,.08));border-radius:12px;display:flex;flex-direction:column;gap:14px;margin-top:18px;padding:18px}.login-module__fallbackHeader___-il2v{color:var(--seamless-text,#f3f4f6);font-size:.95rem;font-weight:600}.login-module__fallbackDescription___ea5EB{color:var(--seamless-text-muted,#9ca3af);font-size:.85rem;line-height:1.4}.login-module__fallbackActions___AD3ni{display:flex;flex-direction:column;gap:10px}.login-module__fallbackActionButton___lFgWf{background:var(--seamless-surface,rgba(0,0,0,.25));border:1px solid var(--seamless-border,hsla(0,0%,100%,.08));border-radius:8px;cursor:pointer;display:flex;flex-direction:column;padding:12px 14px;text-align:left;transition:all .15s ease}.login-module__fallbackActionButton___lFgWf:hover{background:var(--seamless-surface-hover,hsla(0,0%,100%,.06));border-color:var(--seamless-border,hsla(0,0%,100%,.15))}.login-module__actionTitle___ycrMp{color:var(--seamless-text,#f9fafb);font-size:.9rem;font-weight:500}.login-module__actionSubtext___opaIV{color:var(--seamless-text-muted,#9ca3af);font-size:.75rem;margin-top:2px}.login-module__linkButton___5lsoe{background:none;border:none;color:var(--seamless-accent-soft,#60a5fa);cursor:pointer;font-size:.8rem;margin-top:6px}.login-module__linkButton___5lsoe:hover{text-decoration:underline}");const ve=({identifier:o,onMagicLink:i,onEmailOtp:n,onPhoneOtp:a,onPasskeyRetry:s,loginMethods:t})=>{const l=h(o,t,{emailOtp:Boolean(n),passkeyRetry:Boolean(s)});return v(l)?e("div",{className:de,children:[r("div",{className:_e,children:"Choose a sign-in method"}),r("p",{className:me,children:"Choose another secure sign-in method."}),e("div",{className:ue,children:[l.magicLink&&e("button",{type:"button",className:ge,onClick:i,children:[r("span",{className:fe,children:"Email Magic Link"}),r("span",{className:pe,children:"Send a secure sign-in link to your email"})]}),l.emailOtp&&e("button",{type:"button",className:ge,onClick:n,children:[r("span",{className:fe,children:"Email Code"}),r("span",{className:pe,children:"Receive a one-time code by email"})]}),l.phoneOtp&&e("button",{type:"button",className:ge,onClick:a,children:[r("span",{className:fe,children:"Text Message Code"}),r("span",{className:pe,children:"Receive a one-time code via SMS"})]})]}),l.passkeyRetry&&r("button",{type:"button",className:he,onClick:s,children:"Try passkey anyway"})]}):null},be=()=>{const{listOAuthProviders:o,startOAuthLogin:n,finishOAuthLogin:a,ports:s}=d(),t=i(b),[l,c]=g([]),[_,m]=g("");if(f(()=>{let e=!0;return o().then(({data:r})=>{e&&c(r?.providers??[])}),()=>{e=!1}},[o]),0===l.length)return null;return e("div",{className:ue,children:[l.map(o=>r("button",{type:"button",className:ge,onClick:()=>(async e=>{m("");const r=new URL(t,window.location.origin).toString(),{error:o}=await y({actions:{startOAuthLogin:n,finishOAuthLogin:a},oauthRedirect:s.oauthRedirect},{providerId:e,redirectUri:r});o&&m(o)})(o.id),children:e("span",{className:fe,children:["Continue with ",o.name]})},o.id)),_&&r("p",{className:se,children:_})]})},ye=()=>{const i=n(),{hasSignedInBefore:a,login:s,handlePasskeyLogin:t}=d(),l=_(),{passkeySupported:c}=m(),{loginMethods:p}=u(),[h,v]=g(""),[b,y]=g(""),[M,T]=g("register"),[C,O]=g(""),[B,I]=g(""),[S,z]=g(""),[L,q]=g(!1),[A,D]=g(null);f(()=>{a&&T("login")},[a]);const R=()=>"login"===M?k(h)||x(h):k(b);return r("div",{className:$,children:e("div",{className:ee,children:[r("h2",{className:re,children:"login"===M?"Sign In":"Create Account"}),e(o,{children:[e("form",{onSubmit:async e=>{e.preventDefault(),O(""),q(!1);try{if("login"===M){const e=await w({login:s,handlePasskeyLogin:t},{identifier:h,passkeySupported:c,configuredMethods:p});return"error"===e.kind?void O(e.message):"signed_in"===e.kind?void i("/"):(D(e.loginMethods),q(!0),void(e.passkeyFailed&&O(N)))}"register"===M&&await(async()=>{O("");const{error:e}=await P(l,b);e?O(e):i(W)})()}catch{console.error("Failed to continue sign-in."),O("Failed to continue sign-in. Please try again.")}},children:["login"===M&&e("div",{className:oe,children:[r("label",{htmlFor:"identifier",className:ie,children:"Email Address / Phone Number"}),r("input",{id:"identifier",type:"text",value:h,onChange:e=>{const r=e.target.value;v(r)},autoComplete:"off",placeholder:"Email or Phone Number",className:ne,onBlur:()=>{if(h){const e=k(h)||x(h);z(e?"":"Please enter a valid email or phone number")}},required:!0}),r("p",{className:ae,children:"Phone numbers must include a country code e.g. +1"}),L&&r(ve,{identifier:h,onMagicLink:async()=>{const{error:e}=await l.requestMagicLink();e?O("Failed to send magic link."):i(Q,{state:{identifier:h}})},onEmailOtp:async()=>{const{error:e}=await l.requestLoginEmailOtp();e?O("Failed to send email code."):i(W,{state:{flow:"login"}})},onPhoneOtp:async()=>{const{error:e}=await l.requestLoginPhoneOtp();e?O("Failed to send OTP."):i(Y,{state:{flow:"login"}})},onPasskeyRetry:c?t:void 0,loginMethods:A}),S&&r("p",{className:se,children:S})]}),"register"===M&&e("div",{className:oe,children:[r("label",{htmlFor:"email",className:ie,children:"Email Address"}),r("input",{id:"email",type:"email",value:b,onChange:e=>{const r=e.target.value;y(r)},autoComplete:"off",className:ne,onBlur:()=>{if(b){const e=k(b);I(e?"":"Please enter a valid email")}},required:!0}),B&&r("p",{className:se,children:B})]}),r("button",{type:"submit",className:te,disabled:!R(),"aria-describedby":"seamless-submit-hint",children:"login"===M?"Login":"Register"}),r("p",{id:"seamless-submit-hint",role:"status",className:le,children:"login"===M?h?R()?"Ready to continue.":"This does not look like a complete email or phone number yet.":"Enter your email or phone number to continue.":b?R()?"Ready to continue.":"This does not look like a complete email address yet.":"Enter your email address to continue."}),C&&r("p",{className:se,children:C}),r("button",{type:"button",onClick:()=>T("login"===M?"register":"login"),className:ce,children:"login"===M?"Don't have an account? Create one":"Already have an account? Sign in"})]}),r(be,{})]})]})})};var ke={container:"passKeyLogin-module__container___IUKxF",card:"passKeyLogin-module__card___2sKM1",title:"passKeyLogin-module__title___HZxvc",button:"passKeyLogin-module__button___FvR4I"};X(".passKeyLogin-module__container___IUKxF{align-items:center;color:var(--seamless-text,#fff);display:flex;justify-content:center;padding:1rem}.passKeyLogin-module__card___2sKM1{background-color:var(--seamless-surface,#1f2937);border-radius:1rem;box-shadow:0 4px 20px var(--seamless-shadow,rgba(0,0,0,.4));display:flex;flex-direction:column;gap:1.5rem;max-width:400px;padding:2rem;width:100%}.passKeyLogin-module__title___HZxvc{color:var(--seamless-text,#fff);font-size:1.5rem;font-weight:600;text-align:center}.passKeyLogin-module__button___FvR4I{background-color:var(--seamless-accent,#2563eb);border:1px solid var(--seamless-accent,#3b82f6);border-radius:.5rem;color:var(--seamless-accent-contrast,#fff);cursor:pointer;font-weight:500;padding:.75rem 1rem;text-align:center;transition:background-color .2s ease;width:100%}.passKeyLogin-module__button___FvR4I:hover{background-color:var(--seamless-accent-hover,#1d4ed8)}@media (max-width:480px){.passKeyLogin-module__card___2sKM1{padding:1.25rem}.passKeyLogin-module__button___FvR4I{font-size:1rem}}");const xe=()=>{const o=n(),{handlePasskeyLogin:i}=d(),[a,s]=g("");return r("div",{className:ke.container,children:e("div",{className:ke.card,children:[r("h2",{className:ke.title,children:"Login with Passkey"}),r("button",{onClick:async()=>{s("");const{error:e}=await i();e?s("Passkey sign-in could not be completed. Try another sign-in method."):o("/")},className:ke.button,children:"Use Passkey"}),a&&r("p",{className:ke.error,children:a})]})})};var we="registerPasskey-module__container___jqEh8",Ne="registerPasskey-module__card___MJAyC",Pe="registerPasskey-module__loading___Q4i1x",Me="registerPasskey-module__spinner___V1nhd",Te="registerPasskey-module__supported___ihTih",Ce="registerPasskey-module__title___vn2Qu",Oe="registerPasskey-module__description___AWmO-",Be="registerPasskey-module__button___D3b4B",Ie="registerPasskey-module__message___RiOw-",Se="registerPasskey-module__success___HP5aX",ze="registerPasskey-module__error___hGiqE",Le="registerPasskey-module__skip___1hDyU",qe="registerPasskey-module__secondary___bnOB4";X(".registerPasskey-module__container___jqEh8{align-items:center;color:var(--seamless-text,#fff);display:flex;justify-content:center;padding:1rem}.registerPasskey-module__card___MJAyC{background-color:var(--seamless-surface,#1f2937);border-radius:1rem;box-shadow:0 4px 20px var(--seamless-shadow,rgba(0,0,0,.4));max-width:400px;padding:1.5rem;width:100%}.registerPasskey-module__loading___Q4i1x{align-items:center;background-color:var(--seamless-surface,#f9fafb);border-radius:.75rem;box-shadow:0 2px 8px var(--seamless-shadow,rgba(0,0,0,.1));color:var(--seamless-text,#374151);display:flex;font-weight:500;gap:.75rem;justify-content:center;padding:1.5rem}.registerPasskey-module__spinner___V1nhd{animation:registerPasskey-module__spin___oYcsC 1s linear infinite;border-bottom:2px solid var(--seamless-accent,#3b82f6);border-left:2px solid transparent;border-radius:9999px;border-right:2px solid transparent;border-top:2px solid var(--seamless-accent,#3b82f6);height:1.5rem;width:1.5rem}@keyframes registerPasskey-module__spin___oYcsC{to{transform:rotate(1turn)}}.registerPasskey-module__supported___ihTih{background-color:var(--seamless-surface,#ecfdf5);border-radius:.75rem;box-shadow:0 2px 12px var(--seamless-shadow,rgba(0,0,0,.1));color:var(--seamless-text,#065f46);padding:1.25rem}.registerPasskey-module__title___vn2Qu{font-size:1.125rem;font-weight:600;margin-bottom:.5rem}.registerPasskey-module__description___AWmO-{margin-bottom:1rem}.registerPasskey-module__button___D3b4B{background-color:var(--seamless-accent,#059669);border:none;border-radius:.5rem;color:var(--seamless-accent-contrast,#fff);cursor:pointer;font-weight:500;padding:.75rem 1rem;transition:background-color .2s ease;width:100%}.registerPasskey-module__button___D3b4B:hover{background-color:var(--seamless-accent-hover,#047857)}.registerPasskey-module__message___RiOw-{font-size:.875rem;margin-top:1rem}.registerPasskey-module__success___HP5aX{color:var(--seamless-success,#6ee7b7)}.registerPasskey-module__error___hGiqE{color:var(--seamless-danger,#f87171)}.registerPasskey-module__skip___1hDyU{background:none;border:none;color:var(--seamless-accent-soft,#60a5fa);cursor:pointer;font-size:.875rem;margin-top:1.5rem;text-align:center;width:100%}.registerPasskey-module__skip___1hDyU:disabled{cursor:default;opacity:.6}.registerPasskey-module__secondary___bnOB4{background:none;border:1px solid var(--seamless-accent,#059669);border-radius:.5rem;color:var(--seamless-accent,#059669);cursor:pointer;font-weight:500;margin-top:.75rem;padding:.75rem 1rem;transition:background-color .2s ease;width:100%}.registerPasskey-module__secondary___bnOB4:hover:not(:disabled){background-color:var(--seamless-accent-muted,rgba(5,150,105,.1))}.registerPasskey-module__secondary___bnOB4:disabled{cursor:default;opacity:.6}");const Ae=()=>{const{refreshSession:o}=d(),i=_(),{passkeySupported:s,loading:t}=m(),{loginMethods:l,loading:c}=u(),f=n(),p=M(a().state?.returnTo),[h,v]=g("idle"),[b,y]=g(""),k=T(l),x=async()=>{await o(),f(p)},w=async e=>{v("loading");const{error:r}=await C({client:i,refreshSession:o},e);if(r)return v("error"),void y(r);v("success"),y("Passkey registered successfully."),f(p)};return r("div",{className:we,children:r("div",{className:Ne,children:e("div",t||c?{className:Pe,children:[r("div",{className:Me}),r("span",{children:"Checking for Passkey Support..."})]}:s?{className:Te,children:[r("h2",{className:Ce,children:"Secure Your Account with a Passkey"}),r("p",{className:Oe,children:"Your device supports passkeys! Register one to skip passwords forever."}),r("button",{onClick:()=>w(),disabled:"loading"===h,className:Be,children:"loading"===h?"Registering...":"Register Passkey"}),r("button",{type:"button",onClick:()=>w("cross-platform"),disabled:"loading"===h,className:qe,children:"Use a security key instead"}),b&&r("p",{className:`${Ie} ${"success"===h?Se:ze}`,children:b}),k&&r("button",{type:"button",onClick:x,disabled:"loading"===h,className:Le,children:"Skip for now"})]}:{className:Te,children:[r("h2",{className:Ce,children:"Passkeys are not available here"}),r("p",{className:Oe,children:k?"This device does not support passkeys. You can continue without one and add a passkey later from a device that does.":"This device does not support passkeys, and this application requires one to sign in. Try again from a device or browser that supports them."}),k&&r("button",{type:"button",onClick:x,className:Be,children:"Continue"})]})})})};var De="verifyOTP-module__container___wgoDE",Re="verifyOTP-module__card___3cs2p",Ee="verifyOTP-module__title___fZ-1d",je="verifyOTP-module__subtitle___dGSu3",Fe="verifyOTP-module__error___GEtlG",Ge="verifyOTP-module__success___46TjG",Ve="verifyOTP-module__form___jiGG-",Ue="verifyOTP-module__label___Zq5Mi",Ke="verifyOTP-module__timer___smq-a",Ye="verifyOTP-module__resend___PlmkG",We="verifyOTP-module__button___8pIuO",Je="verifyOTP-module__toggle___wbzVa";X(".verifyOTP-module__container___wgoDE{align-items:center;color:var(--seamless-text,#fff);display:flex;justify-content:center;padding:1rem}.verifyOTP-module__card___3cs2p{background-color:var(--seamless-surface,#1f2937);border-radius:.5rem;box-shadow:0 0 10px var(--seamless-shadow,rgba(0,0,0,.3));max-width:28rem;padding:1.5rem;width:100%}.verifyOTP-module__title___fZ-1d{color:var(--seamless-text,#fff);font-size:1.5rem;font-weight:700;margin-bottom:1rem;text-align:center}.verifyOTP-module__subtitle___dGSu3{color:var(--seamless-text-muted,#9ca3af);font-size:.875rem;margin-bottom:1.5rem;text-align:center}.verifyOTP-module__error___GEtlG{color:var(--seamless-danger,#f87171);margin-bottom:1rem;text-align:center}.verifyOTP-module__success___46TjG{color:var(--seamless-success,#34d399);margin-bottom:.75rem;text-align:center}.verifyOTP-module__form___jiGG-{display:flex;flex-direction:column;gap:1rem}.verifyOTP-module__label___Zq5Mi{color:var(--seamless-text-muted,#d1d5db);display:block;font-size:.875rem;margin-bottom:.25rem}.verifyOTP-module__timer___smq-a{color:var(--seamless-warning,#facc15);font-size:.875rem}.verifyOTP-module__input___yqIXM{background-color:var(--seamless-surface-raised,#374151);border:1px solid var(--seamless-border,#4b5563);border-radius:.375rem;color:var(--seamless-text,#fff);outline:none;padding:.5rem;width:100%}.verifyOTP-module__input___yqIXM:focus{box-shadow:0 0 0 2px var(--seamless-accent,#3b82f6)}.verifyOTP-module__resend___PlmkG{background:none;border:none;color:var(--seamless-accent-soft,#60a5fa);cursor:pointer;font-size:.75rem;margin-top:.25rem;text-decoration:underline}.verifyOTP-module__resend___PlmkG:hover{color:var(--seamless-accent,#3b82f6)}.verifyOTP-module__button___8pIuO{background-color:var(--seamless-accent,#2563eb);border:none;border-radius:.375rem;color:var(--seamless-accent-contrast,#fff);cursor:pointer;padding:.5rem;transition:background-color .2s;width:100%}.verifyOTP-module__button___8pIuO:hover{background-color:var(--seamless-accent-hover,#1d4ed8)}.verifyOTP-module__toggle___wbzVa{background:none;border:none;color:var(--seamless-accent-soft,#60a5fa);cursor:pointer;font-size:.875rem;margin-top:1.5rem;text-align:center;width:100%}");var He="otpInput-module__otpContainer___MUjby",Ze="otpInput-module__otpInput___3YMVm";X(".otpInput-module__otpContainer___MUjby{display:flex;gap:8px;justify-content:center;margin-top:8px}.otpInput-module__otpInput___3YMVm{background:var(--seamless-surface-raised,#374151);border:1px solid var(--seamless-border,#4b5563);border-radius:8px;color:var(--seamless-text,#fff);font-size:1.2rem;height:48px;text-align:center;transition:border-color .15s ease,box-shadow .15s ease;width:42px}.otpInput-module__otpInput___3YMVm:focus{border-color:var(--seamless-accent,#60a5fa);box-shadow:0 0 0 2px var(--seamless-accent,rgba(96,165,250,.25));outline:none}");const Qe=({length:e=6,value:o,inputMode:i="numeric",onChange:n,name:a="otp"})=>{const s=p([]),t=o.split("").concat(Array(e).fill("")).slice(0,e),l=(r,o)=>{const a=B(o,i).slice(0,e),l=[...t];a.forEach((o,i)=>{r+i<e&&(l[r+i]=o)}),n(l.join("")),s.current[Math.min(r+a.length,e-1)]?.focus()};return r("div",{className:He,role:"group","aria-label":"One-time password input",onPaste:e=>{e.preventDefault(),l(0,e.clipboardData.getData("text"))},children:t.map((o,c)=>r("input",{ref:e=>s.current[c]=e,type:"text",inputMode:"numeric"===i?"numeric":"text",autoComplete:"one-time-code",name:`${a}-${c}`,maxLength:1,value:o,className:Ze,onChange:e=>((e,r)=>{if(r.length>1)l(e,r);else if(!r||O(r,i)){const o=[...t];o[e]=r;const i=o.join("");n(i),r&&s.current[e+1]&&s.current[e+1]?.focus()}})(c,e.target.value),onKeyDown:r=>((r,o)=>{if("Backspace"===o.key){o.preventDefault();const e=[...t];t[r]?(e[r]="",n(e.join(""))):r>0&&(e[r-1]="",n(e.join("")),s.current[r-1]?.focus())}"ArrowLeft"===o.key&&r>0&&s.current[r-1]?.focus(),"ArrowRight"===o.key&&r<e-1&&s.current[r+1]?.focus()})(c,r),"aria-label":`Digit ${c+1}`},c))})},Xe=()=>{const o=n(),i=a(),{refreshSession:s}=d(),t="login"===i.state?.flow,[l,c]=g(""),[m,u]=g(null),[p,h]=g(""),[v,b]=g(!1),[y,k]=g(""),[x,w]=g(I),N=_(),P=async()=>{if(m)return;const{next:e,error:r}=await L({client:N,refreshSession:s},{channel:"phone",flow:t?"login":"register",code:l});if(null===r)return"verify_email"===e?(u(!0),void o(W)):void o("/");h(r)},M=async()=>{k(""),await(async()=>{h("");const{error:e}=await q(N,"phone",t?"login":"register");e?h(A("phone")):k("Verification SMS has been resent.")})(),k("Verification SMS has been resent.")};return f(()=>{const e=setInterval(()=>{w(e=>e>0?e-1:0)},1e3);return()=>clearInterval(e)},[]),r("div",{className:De,children:e("div",{className:Re,children:[r("h2",{className:Ee,children:"Verify Your Phone Number"}),r("p",{className:je,children:"Enter the code sent to your phone number."}),p&&r("p",{className:Fe,children:p}),y&&r("p",{className:Ge,children:y}),e("form",{onSubmit:async e=>{if(e.preventDefault(),h(""),l.length===z){b(!0);try{await P()}catch{h("Unexpected error occurred.")}finally{b(!1)}}else h("Please enter a valid code.")},className:Ve,children:[e("div",{children:[e("label",{htmlFor:"phoneCode",className:Ue,children:["Phone Verification Code ",(T=m,!0===T?r("span",{className:"text-green-400 ml-2",children:"✅"}):!1===T?r("span",{className:"text-red-400 ml-2",children:"❌"}):null)," -"," ",e("span",{className:Ke,children:["Code expires in: ",S(x)]})]}),r(Qe,{length:6,value:l,onChange:c}),r("button",{type:"button",onClick:()=>M(),className:Ye,children:"Resend code to phone"})]}),r("button",{type:"submit",className:We,children:v?"Verifying...":"Verify & Continue"}),r("button",{type:"button",onClick:()=>o("/login"),className:Je,children:"Back to login"})]})]})});var T},$e=()=>{const o=n(),i=a(),{refreshSession:s}=d(),t=_(),{passkeySupported:l}=m(),c="login"===i.state?.flow,[u,p]=g(!1),[h,v]=g(""),[b,y]=g(I),[k,x]=g(""),[w,N]=g("");return f(()=>{const e=setInterval(()=>{y(e=>e>0?e-1:0)},1e3);return()=>clearInterval(e)},[]),r("div",{className:De,children:e("div",{className:Re,children:[r("h2",{className:Ee,children:"Verify Your Email"}),r("p",{className:je,children:"We sent you a verification email. Enter the code below."}),k&&r("p",{className:Fe,children:k}),w&&r("p",{className:Ge,children:w}),e("form",{onSubmit:async e=>{if(e.preventDefault(),x(""),h.length===z){p(!0);try{const{next:e,error:r}=await L({client:t,refreshSession:s},{channel:"email",flow:c?"login":"register",code:h,passkeySupported:l});if(null!==r)return void x(r);o("register_passkey"===e?Z:"/")}catch{console.error("Email OTP verification failed."),x("Verification failed.")}finally{p(!1)}}else x("Please enter a valid code.")},className:Ve,children:[e("div",{children:[e("label",{htmlFor:"emailCode",className:Ue,children:["Email Verification Code",e("span",{className:Ke,children:[" ","— Code expires in ",S(b)]})]}),r(Qe,{length:6,value:h,onChange:v,inputMode:"text"}),r("button",{type:"button",onClick:async()=>{x(""),N("");const{error:e}=await q(t,"email",c?"login":"register");e?x(A("email")):N("Verification email has been resent.")},className:Ye,children:"Resend code to email"})]}),r("button",{type:"submit",className:We,disabled:u,children:u?"Verifying...":"Verify & Continue"}),r("button",{type:"button",onClick:()=>o("/login"),className:Je,children:"Back to login"})]})]})})};var er="verifyMagiclink-module__container___qrSXf",rr="verifyMagiclink-module__card___niKgr",or="verifyMagiclink-module__title___SumxD",ir="verifyMagiclink-module__verificationContent___NdsS0",nr="verifyMagiclink-module__spinner___lnW1k",ar="verifyMagiclink-module__successIcon___XjFEM",sr="verifyMagiclink-module__checkIcon___I0JOP",tr="verifyMagiclink-module__prompt___tvPn4",lr="verifyMagiclink-module__helperText___ggTZw",cr="verifyMagiclink-module__actions___6Jf29",dr="verifyMagiclink-module__primaryButton___8DcTo",_r="verifyMagiclink-module__secondaryButton___8n-GU",mr="verifyMagiclink-module__error___tfBn0",ur="verifyMagiclink-module__successText___lO5Qq";X(".verifyMagiclink-module__container___qrSXf{align-items:center;color:var(--seamless-text,#fff);display:flex;justify-content:center;padding:1rem}.verifyMagiclink-module__card___niKgr{background-color:var(--seamless-surface,#1f2937);border-radius:.5rem;box-shadow:0 0 10px var(--seamless-shadow,rgba(0,0,0,.3));max-width:28rem;padding:1.5rem;width:100%}.verifyMagiclink-module__title___SumxD{color:var(--seamless-text,#fff);font-size:1.5rem;font-weight:700;margin-bottom:1rem;text-align:center}.verifyMagiclink-module__verificationContent___NdsS0{align-items:center;display:flex;flex-direction:column;gap:14px;margin:20px 0}.verifyMagiclink-module__spinner___lnW1k{animation:verifyMagiclink-module__spin___2lGzj .9s linear infinite;border:3px solid var(--seamless-border,hsla(0,0%,100%,.15));border-radius:50%;border-top-color:var(--seamless-accent,#60a5fa);height:28px;width:28px}.verifyMagiclink-module__successIcon___XjFEM{align-items:center;background:rgba(16,185,129,.15);border-radius:50%;display:flex;height:36px;justify-content:center;width:36px}.verifyMagiclink-module__checkIcon___I0JOP{animation:verifyMagiclink-module__checkPop___-3qJu .25s ease-out;color:var(--seamless-success,#34d399);height:22px;width:22px}.verifyMagiclink-module__prompt___tvPn4{font-weight:600;line-height:1.4;text-align:center}.verifyMagiclink-module__helperText___ggTZw{color:var(--seamless-text-muted,#9ca3af);font-size:.875rem;line-height:1.4;text-align:center}.verifyMagiclink-module__actions___6Jf29{display:flex;flex-direction:column;gap:.6rem;width:100%}.verifyMagiclink-module__primaryButton___8DcTo{background-color:var(--seamless-accent,#2563eb);border:none;border-radius:.375rem;color:var(--seamless-accent-contrast,#fff);cursor:pointer;font:inherit;font-weight:500;padding:.65rem;width:100%}.verifyMagiclink-module__primaryButton___8DcTo:hover:not(:disabled){background-color:var(--seamless-accent-hover,#1d4ed8)}.verifyMagiclink-module__secondaryButton___8n-GU{background:transparent;border:1px solid var(--seamless-border,#374151);border-radius:.375rem;color:var(--seamless-text,#fff);cursor:pointer;font:inherit;padding:.65rem;width:100%}.verifyMagiclink-module__secondaryButton___8n-GU:hover:not(:disabled){background:var(--seamless-surface-hover,#1f2937)}.verifyMagiclink-module__primaryButton___8DcTo:disabled,.verifyMagiclink-module__secondaryButton___8n-GU:disabled{cursor:not-allowed;opacity:.6}.verifyMagiclink-module__error___tfBn0{color:var(--seamless-danger,#f87171);text-align:center}.verifyMagiclink-module__successText___lO5Qq{color:var(--seamless-success,#34d399);font-size:.9rem}@keyframes verifyMagiclink-module__checkPop___-3qJu{0%{opacity:0;transform:scale(.6)}80%{transform:scale(1.15)}to{opacity:1;transform:scale(1)}}@keyframes verifyMagiclink-module__spin___2lGzj{to{transform:rotate(1turn)}}");const gr=()=>{const[i]=s(),a=n(),t=i.get("token"),[l,c]=g(""),[m,u]=g(null),[h,v]=g(null),[b,y]=g("pending"),[k,x]=g(""),w=_(),{refreshSession:N}=d(),P=p(null);f(()=>{let e=!0,r=null;return(async()=>{if(!t)return e&&c("Missing token for verification."),void console.error("No magic-link token found.");P.current?.token!==t&&(P.current={token:t,result:w.verifyMagicLink(t)});const{error:o}=await P.current.result;if(!e)return;if(o){const e=R(o);return e?void v(e):(console.error("Failed to verify token"),void c("Failed to verify token"))}const i=await E({client:w,refreshSession:N});e&&(u(i),"elsewhere"!==i&&(r=setTimeout(()=>{e&&a("/")},900)))})(),()=>{e=!1,r&&clearTimeout(r)}},[t,w,a,N]);return r("div",h?{className:er,children:e("div",{className:rr,children:[r("h1",{className:or,children:"Confirm this sign-in"}),e("div",{className:ir,children:[("pending"===b||"confirming"===b)&&e(o,{children:[r("p",{className:tr,children:D(h)}),r("p",{className:lr,children:"This link was opened on a different device from the one that asked for it. Only continue if you made that request."}),e("div",{className:cr,children:[r("button",{type:"button",className:dr,disabled:"confirming"===b,onClick:()=>{(async()=>{if(!t||"confirming"===b)return;y("confirming"),x("");const{error:e}=await j({client:w,token:t});if(e)return y("pending"),void x("We could not confirm this sign-in. The link may have expired or already been used.");y("confirmed")})()},children:"Yes, sign in that device"}),r("button",{type:"button",className:_r,disabled:"confirming"===b,onClick:()=>y("declined"),children:"No, this wasn't me"})]}),k&&r("p",{className:mr,role:"alert",children:k})]}),"confirmed"===b&&r("p",{className:ur,role:"status",children:"Sign-in approved. You can return to your other device to continue."}),"declined"===b&&r("p",{className:lr,role:"status",children:"No one has been signed in. You can ignore the email and close this page."})]})]})}:{className:er,children:e("div",{className:rr,children:[r("h1",{className:or,children:"Verifying your login"}),e("div",{className:ir,children:[!m&&!l&&r("div",{className:nr}),m&&r("div",{className:ar,children:r("svg",{viewBox:"0 0 24 24",className:sr,fill:"none",stroke:"currentColor",strokeWidth:"2",children:r("path",{d:"M5 13l4 4L19 7"})})}),!m&&!l&&r("p",{className:lr,children:"Please wait while we securely verify your sign-in link."}),"signed-in"===m&&r("p",{className:ur,children:"Login verified. Redirecting…"}),"elsewhere"===m&&r("p",{className:ur,children:"Login verified. Return to the device where you requested this link to continue."}),l&&r("p",{className:mr,children:l})]})]})})},fr=()=>{const{finishOAuthLogin:i}=d(),a=n(),[t]=s(),[l,c]=g(""),_=p(!1);return f(()=>{_.current||(_.current=!0,F({finishOAuthLogin:i},t,window.location.origin).then(e=>{"error"!==e.kind?"enroll_passkey"!==e.kind?a(e.destination):a(Z,{state:{returnTo:e.returnTo}}):c(e.message)}))},[i,a,t]),e("div",{className:er,children:[r("h2",{className:or,children:l?"Sign-in failed":"Completing sign-in..."}),l&&e(o,{children:[r("p",{children:l}),r("button",{type:"button",onClick:()=>a("/login"),children:"Back to login"})]})]})};var pr="magiclink-module__container___45zcA",hr="magiclink-module__card___Au9oN",vr="magiclink-module__iconWrapper___k5ndr",br="magiclink-module__mailIcon___Pwb7q",yr="magiclink-module__iconRing___bdLvf",kr="magiclink-module__heading___b9cre",xr="magiclink-module__message___kiVFj",wr="magiclink-module__identifier___JtcFM",Nr="magiclink-module__helperText___7Mlfh",Pr="magiclink-module__actions___64I-3",Mr="magiclink-module__secondaryButton___BntAI",Tr="magiclink-module__cooldown___Ib4rm",Cr="magiclink-module__linkButton___maJiv";X(".magiclink-module__container___45zcA{align-items:center;color:var(--seamless-text,#fff);display:flex;justify-content:center}.magiclink-module__card___Au9oN{background-color:var(--seamless-surface,#1f2937);border-radius:.75rem;box-shadow:0 10px 25px var(--seamless-shadow,rgba(0,0,0,.25));max-width:420px;padding:2.5rem 2rem;text-align:center;width:100%}.magiclink-module__iconWrapper___k5ndr{display:flex;justify-content:center;margin-bottom:1.25rem;position:relative}.magiclink-module__mailIcon___Pwb7q{color:var(--seamless-accent-soft,#a5b4fc);height:38px;width:38px;z-index:2}.magiclink-module__iconRing___bdLvf{animation:magiclink-module__pulse___YGm-I 2s infinite;background:rgba(99,102,241,.15);border-radius:50%;height:72px;position:absolute;width:72px}@keyframes magiclink-module__pulse___YGm-I{0%{opacity:.8;transform:scale(.6)}70%{opacity:0;transform:scale(1.4)}to{opacity:0}}.magiclink-module__heading___b9cre{font-size:1.55rem;font-weight:600;margin-bottom:.75rem}.magiclink-module__message___kiVFj{color:var(--seamless-text-muted,#d1d5db);font-size:.95rem;line-height:1.4;margin-bottom:1rem}.magiclink-module__identifier___JtcFM{background:var(--seamless-surface-raised,hsla(0,0%,100%,.05));border-radius:6px;display:inline-block;font-size:1rem;font-weight:600;margin-bottom:1rem;padding:.45rem .6rem}.magiclink-module__helperText___7Mlfh{color:var(--seamless-text-muted,#9ca3af);font-size:.85rem;line-height:1.4;margin-bottom:.6rem}.magiclink-module__actions___64I-3{display:flex;flex-direction:column;gap:.6rem;margin-top:1.6rem}.magiclink-module__secondaryButton___BntAI{background:var(--seamless-surface,#111827);border:1px solid var(--seamless-border,#374151);border-radius:8px;color:var(--seamless-text,#fff);cursor:pointer;font-weight:500;padding:.65rem}.magiclink-module__secondaryButton___BntAI:hover:not(:disabled){background:var(--seamless-surface-hover,#1f2937)}.magiclink-module__secondaryButton___BntAI:disabled{cursor:not-allowed;opacity:.5}.magiclink-module__cooldown___Ib4rm{color:var(--seamless-text-muted,#9ca3af);font-size:.8rem}.magiclink-module__linkButton___maJiv{background:none;border:none;color:var(--seamless-accent-soft,#a5b4fc);cursor:pointer;font-size:.85rem;margin-top:.4rem}.magiclink-module__linkButton___maJiv:hover{text-decoration:underline}");const Or=()=>{const{refreshSession:o}=d(),i=n(),s=a(),t=_(),l=s.state?.identifier,[c,m]=g(G);f(()=>{const e=setInterval(()=>{m(e=>e>0?e-1:0)},1e3);return()=>clearInterval(e)},[]);return f(()=>V({client:t,refreshSession:o,onSignedIn:()=>i("/")}),[t,i,o]),r("div",{className:pr,children:e("div",{className:hr,children:[e("div",{className:vr,children:[r("div",{className:yr}),e("svg",{className:br,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.8",children:[r("path",{d:"M4 6h16v12H4z"}),r("path",{d:"m4 6 8 6 8-6"})]})]}),r("h2",{className:kr,children:"Check your email"}),r("p",{className:xr,children:"If an account exists for this address, we sent a secure sign-in link."}),l&&r("div",{className:wr,children:l}),r("p",{className:Nr,children:"Open the email and click the link to finish signing in."}),r("p",{className:Nr,children:"Didn’t receive anything? Check your spam folder or try creating a new account."}),e("div",{className:Pr,children:[r("button",{className:Mr,disabled:c>0,onClick:async()=>{c>0||(await t.requestMagicLink(),m(G))},children:"Resend link"}),c>0&&e("div",{className:Tr,children:["Available in ",c,"s"]}),r("button",{className:Cr,onClick:()=>i("/login"),children:"Change email or phone"})]})]})})},Br=()=>e(t,{children:[r(l,{path:U,element:r(ye,{})}),r(l,{path:K,element:r(xe,{})}),r(l,{path:Y,element:r(Xe,{})}),r(l,{path:W,element:r($e,{})}),r(l,{path:J,element:r(gr,{})}),r(l,{path:H,element:r(fr,{})}),r(l,{path:Z,element:r(Ae,{})}),r(l,{path:Q,element:r(Or,{})}),r(l,{path:"*",element:r(c,{to:U,replace:!0})})]});export{Br as AuthRoutes};
|
|
3
3
|
//# sourceMappingURL=routes.js.map
|
package/dist/routes.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"routes.js","sources":["../src/authRoutePaths.ts","../../../node_modules/style-inject/dist/style-inject.es.js","../src/components/AuthFallbackOptions.tsx","../src/components/OAuthProviderButtons.tsx","../src/views/Login.tsx","../src/views/PassKeyLogin.tsx","../src/views/PassKeyRegistration.tsx","../src/components/OtpInput.tsx","../src/views/PhoneRegistration.tsx","../src/views/EmailRegistration.tsx","../src/views/VerifyMagicLink.tsx","../src/views/OAuthCallback.tsx","../src/components/MagicLinkSent.tsx","../src/AuthRoutes.tsx"],"sourcesContent":[null,"function styleInject(css, ref) {\n if ( ref === void 0 ) ref = {};\n var insertAt = ref.insertAt;\n\n if (!css || typeof document === 'undefined') { return; }\n\n var head = document.head || document.getElementsByTagName('head')[0];\n var style = document.createElement('style');\n style.type = 'text/css';\n\n if (insertAt === 'top') {\n if (head.firstChild) {\n head.insertBefore(style, head.firstChild);\n } else {\n head.appendChild(style);\n }\n } else {\n head.appendChild(style);\n }\n\n if (style.styleSheet) {\n style.styleSheet.cssText = css;\n } else {\n style.appendChild(document.createTextNode(css));\n }\n}\n\nexport default styleInject;\n",null,null,null,null,null,null,null,null,null,null,null,null],"names":["authRoutePaths","styleInject","css","ref","insertAt","document","head","getElementsByTagName","style","createElement","type","firstChild","insertBefore","appendChild","styleSheet","cssText","createTextNode","AuthFallbackOptions","identifier","onMagicLink","onEmailOtp","onPhoneOtp","onPasskeyRetry","loginMethods","options","fallbackSignInOptions","emailOtp","Boolean","passkeyRetry","hasFallbackSignInOption","_jsxs","className","styles","children","_jsx","magicLink","onClick","phoneOtp","OAuthProviderButtons","listOAuthProviders","startOAuthLogin","finishOAuthLogin","ports","useAuth","callbackHref","useHref","OAUTH_CALLBACK_PATH","providers","setProviders","useState","error","setError","useEffect","active","then","data","length","map","provider","async","providerId","redirectUri","URL","window","location","origin","toString","startOAuthSignIn","actions","oauthRedirect","handleSelect","id","name","Login","navigate","useNavigate","hasSignedInBefore","login","handlePasskeyLogin","authClient","useAuthClient","passkeySupported","usePasskeySupport","configuredMethods","useLoginMethods","setIdentifier","email","setEmail","mode","setMode","formErrors","setFormErrors","emailError","setEmailError","identifierError","setIdentifierError","showFallbackOptions","setShowFallbackOptions","setLoginMethods","canSubmit","isValidEmail","isValidPhoneNumber","_Fragment","onSubmit","e","preventDefault","step","beginSignIn","kind","message","passkeyFailed","PASSKEY_SIGN_IN_FAILED","registerWithEmail","register","console","htmlFor","value","onChange","target","autoComplete","placeholder","onBlur","isValid","required","requestMagicLink","state","requestLoginEmailOtp","flow","requestLoginPhoneOtp","undefined","disabled","role","PassKeyLogin","runPasskeyLogin","container","card","title","passkeyError","button","PasskeyRegistration","refreshSession","loading","passkeySupportLoading","loginMethodsLoading","destination","safeReturnPath","useLocation","returnTo","status","setStatus","setMessage","canSkip","hasNonPasskeyLoginMethod","finishWithoutPasskey","registerPasskey","attachment","enrollPasskey","client","OtpInput","inputMode","inputs","useRef","values","split","concat","Array","fill","slice","handleBulkInput","index","input","chars","otpCharacters","newValueArr","forEach","char","i","join","current","Math","min","focus","onPaste","clipboardData","getData","el","maxLength","isOtpCharacter","newValue","handleChange","onKeyDown","key","handleKeyDown","PhoneRegistration","isLoginFlow","setPhoneOtp","phoneVerified","setPhoneVerified","setLoading","resendMsg","setResendMsg","phoneTimeLeft","setPhoneTimeLeft","OTP_LIFETIME_SECONDS","verifyPhoneOTP","next","verifyOtp","channel","code","handleResend","requestOtp","otpResendFailedMessage","onResendPhone","interval","setInterval","prev","clearInterval","OTP_LENGTH","verified","formatCountdown","EmailRegistration","setEmailOtp","emailTimeLeft","setEmailTimeLeft","VerifyMagicLink","searchParams","useSearchParams","token","get","outcome","setOutcome","verification","mounted","redirectTimeout","result","verifyMagicLink","finishMagicLinkSignIn","setTimeout","verify","clearTimeout","verificationContent","spinner","successIcon","viewBox","checkIcon","stroke","strokeWidth","d","helperText","successText","OAuthCallback","startedRef","completeOAuthCallback","MagicLinkSent","cooldown","setCooldown","MAGIC_LINK_RESEND_COOLDOWN_SECONDS","timer","c","watchMagicLink","onSignedIn","AuthRoutes","Routes","Route","path","element","Navigate","to","replace"],"mappings":";w5BAiBO,MAAMA,EACJ,SADIA,EAEG,iBAFHA,EAGK,oBAHLA,EAIK,oBAJLA,EAKM,oBALNA,EAMI,kBANJA,EAOM,oBAPNA,EAQI,mBCzBjB,SAASC,EAAYC,EAAKC,YACnBA,IAAiBA,EAAM,CAAA,GAC5B,IAAIC,EAAWD,EAAIC,SAEnB,GAAKF,GAA2B,oBAAbG,SAAnB,CAEA,IAAIC,EAAOD,SAASC,MAAQD,SAASE,qBAAqB,QAAQ,GAC9DC,EAAQH,SAASI,cAAc,SACnCD,EAAME,KAAO,WAEI,QAAbN,GACEE,EAAKK,WACPL,EAAKM,aAAaJ,EAAOF,EAAKK,YAKhCL,EAAKO,YAAYL,GAGfA,EAAMM,WACRN,EAAMM,WAAWC,QAAUb,EAE3BM,EAAMK,YAAYR,SAASW,eAAed,GAnBW,CAqBzD,k6ICDA,MAAMe,GAA0D,EAC9DC,aACAC,cACAC,aACAC,aACAC,iBACAC,mBAEA,MAAMC,EAAUC,EAAsBP,EAAYK,EAAc,CAC9DG,SAAUC,QAAQP,GAClBQ,aAAcD,QAAQL,KAGxB,OAAKO,EAAwBL,GAK3BM,EAAA,MAAA,CAAKC,UAAWC,GAAmBC,SAAA,CACjCC,EAAA,MAAA,CAAKH,UAAWC,GAAqBC,SAAA,4BAErCC,OAAGH,UAAWC,GAA0BC,SAAA,0CAExCH,SAAKC,UAAWC,GAAsBC,SAA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,EAAK,CAACC,KAAMxQ,EAAsByQ,QAASvO,EAACuC,GAAK,CAAA,KAClDvC,EAACqO,EAAK,CAACC,KAAMxQ,EAA6ByQ,QAASvO,EAACkG,GAAY,CAAA,KAChElG,EAACqO,EAAK,CAACC,KAAMxQ,EAA+ByQ,QAASvO,EAAC+J,GAAiB,CAAA,KACvE/J,EAACqO,EAAK,CAACC,KAAMxQ,EAA+ByQ,QAASvO,EAAC0L,SACtD1L,EAACqO,EAAK,CAACC,KAAMxQ,EAAgCyQ,QAASvO,EAAC8L,SACvD9L,EAACqO,GAAMC,KAAMxQ,EAA8ByQ,QAASvO,EAACwN,GAAa,CAAA,KAClExN,EAACqO,EAAK,CAACC,KAAMxQ,EAAgCyQ,QAASvO,EAACyG,GAAmB,CAAA,KAC1EzG,EAACqO,EAAK,CAACC,KAAMxQ,EAA8ByQ,QAASvO,EAAC2N,GAAa,CAAA,KAClE3N,EAACqO,EAAK,CAACC,KAAK,IAAIC,QAASvO,EAACwO,GAASC,GAAI3Q,EAAsB4Q","x_google_ignoreList":[1]}
|
|
1
|
+
{"version":3,"file":"routes.js","sources":["../src/authRoutePaths.ts","../../../node_modules/style-inject/dist/style-inject.es.js","../src/components/AuthFallbackOptions.tsx","../src/components/OAuthProviderButtons.tsx","../src/views/Login.tsx","../src/views/PassKeyLogin.tsx","../src/views/PassKeyRegistration.tsx","../src/components/OtpInput.tsx","../src/views/PhoneRegistration.tsx","../src/views/EmailRegistration.tsx","../src/views/VerifyMagicLink.tsx","../src/views/OAuthCallback.tsx","../src/components/MagicLinkSent.tsx","../src/AuthRoutes.tsx"],"sourcesContent":[null,"function styleInject(css, ref) {\n if ( ref === void 0 ) ref = {};\n var insertAt = ref.insertAt;\n\n if (!css || typeof document === 'undefined') { return; }\n\n var head = document.head || document.getElementsByTagName('head')[0];\n var style = document.createElement('style');\n style.type = 'text/css';\n\n if (insertAt === 'top') {\n if (head.firstChild) {\n head.insertBefore(style, head.firstChild);\n } else {\n head.appendChild(style);\n }\n } else {\n head.appendChild(style);\n }\n\n if (style.styleSheet) {\n style.styleSheet.cssText = css;\n } else {\n style.appendChild(document.createTextNode(css));\n }\n}\n\nexport default styleInject;\n",null,null,null,null,null,null,null,null,null,null,null,null],"names":["authRoutePaths","styleInject","css","ref","insertAt","document","head","getElementsByTagName","style","createElement","type","firstChild","insertBefore","appendChild","styleSheet","cssText","createTextNode","AuthFallbackOptions","identifier","onMagicLink","onEmailOtp","onPhoneOtp","onPasskeyRetry","loginMethods","options","fallbackSignInOptions","emailOtp","Boolean","passkeyRetry","hasFallbackSignInOption","_jsxs","className","styles","children","_jsx","magicLink","onClick","phoneOtp","OAuthProviderButtons","listOAuthProviders","startOAuthLogin","finishOAuthLogin","ports","useAuth","callbackHref","useHref","OAUTH_CALLBACK_PATH","providers","setProviders","useState","error","setError","useEffect","active","then","data","length","map","provider","async","providerId","redirectUri","URL","window","location","origin","toString","startOAuthSignIn","actions","oauthRedirect","handleSelect","id","name","Login","navigate","useNavigate","hasSignedInBefore","login","handlePasskeyLogin","authClient","useAuthClient","passkeySupported","usePasskeySupport","configuredMethods","useLoginMethods","setIdentifier","email","setEmail","mode","setMode","formErrors","setFormErrors","emailError","setEmailError","identifierError","setIdentifierError","showFallbackOptions","setShowFallbackOptions","setLoginMethods","canSubmit","isValidEmail","isValidPhoneNumber","_Fragment","onSubmit","e","preventDefault","step","beginSignIn","kind","message","passkeyFailed","PASSKEY_SIGN_IN_FAILED","registerWithEmail","register","console","htmlFor","value","onChange","target","autoComplete","placeholder","onBlur","isValid","required","requestMagicLink","state","requestLoginEmailOtp","flow","requestLoginPhoneOtp","undefined","disabled","role","PassKeyLogin","runPasskeyLogin","container","card","title","passkeyError","button","PasskeyRegistration","refreshSession","loading","passkeySupportLoading","loginMethodsLoading","destination","safeReturnPath","useLocation","returnTo","status","setStatus","setMessage","canSkip","hasNonPasskeyLoginMethod","finishWithoutPasskey","registerPasskey","attachment","enrollPasskey","client","OtpInput","inputMode","inputs","useRef","values","split","concat","Array","fill","slice","handleBulkInput","index","input","chars","otpCharacters","newValueArr","forEach","char","i","join","current","Math","min","focus","onPaste","clipboardData","getData","el","maxLength","isOtpCharacter","newValue","handleChange","onKeyDown","key","handleKeyDown","PhoneRegistration","isLoginFlow","setPhoneOtp","phoneVerified","setPhoneVerified","setLoading","resendMsg","setResendMsg","phoneTimeLeft","setPhoneTimeLeft","OTP_LIFETIME_SECONDS","verifyPhoneOTP","next","verifyOtp","channel","code","handleResend","requestOtp","otpResendFailedMessage","onResendPhone","interval","setInterval","prev","clearInterval","OTP_LENGTH","verified","formatCountdown","EmailRegistration","setEmailOtp","emailTimeLeft","setEmailTimeLeft","VerifyMagicLink","searchParams","useSearchParams","token","get","outcome","setOutcome","confirmation","setConfirmation","decision","setDecision","confirmError","setConfirmError","verification","mounted","redirectTimeout","result","verifyMagicLink","held","getMagicLinkConfirmation","finishMagicLinkSignIn","setTimeout","verify","clearTimeout","magicLinkConfirmationPrompt","confirmMagicLinkSignIn","confirm","viewBox","stroke","strokeWidth","d","OAuthCallback","startedRef","completeOAuthCallback","MagicLinkSent","cooldown","setCooldown","MAGIC_LINK_RESEND_COOLDOWN_SECONDS","timer","c","watchMagicLink","onSignedIn","AuthRoutes","Routes","Route","path","element","Navigate","to","replace"],"mappings":";m/BAiBO,MAAMA,EACJ,SADIA,EAEG,iBAFHA,EAGK,oBAHLA,EAIK,oBAJLA,EAKM,oBALNA,EAMI,kBANJA,EAOM,oBAPNA,EAQI,mBCzBjB,SAASC,EAAYC,EAAKC,YACnBA,IAAiBA,EAAM,CAAA,GAC5B,IAAIC,EAAWD,EAAIC,SAEnB,GAAKF,GAA2B,oBAAbG,SAAnB,CAEA,IAAIC,EAAOD,SAASC,MAAQD,SAASE,qBAAqB,QAAQ,GAC9DC,EAAQH,SAASI,cAAc,SACnCD,EAAME,KAAO,WAEI,QAAbN,GACEE,EAAKK,WACPL,EAAKM,aAAaJ,EAAOF,EAAKK,YAKhCL,EAAKO,YAAYL,GAGfA,EAA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,EAAYC,KAmDWpO,SAAA,gBAKhBkO,EAAW,GACVrO,EAAA,MAAA,CAAKC,UAAWC,GAAeC,SAAA,CAAA,gBAAgBkO,SAGjDjO,EAAA,SAAA,CAAQH,UAAWC,GAAmBI,QAAS,IAAMsC,EAAS,UAASzC,SAAA,mCCnFpEyO,GAAa,IACxB5O,EAAC6O,aACCzO,EAAC0O,EAAK,CAACC,KAAM7Q,EAAsB8Q,QAAS5O,EAACuC,GAAK,CAAA,KAClDvC,EAAC0O,EAAK,CAACC,KAAM7Q,EAA6B8Q,QAAS5O,EAACkG,GAAY,CAAA,KAChElG,EAAC0O,EAAK,CAACC,KAAM7Q,EAA+B8Q,QAAS5O,EAAC+J,GAAiB,CAAA,KACvE/J,EAAC0O,EAAK,CAACC,KAAM7Q,EAA+B8Q,QAAS5O,EAAC0L,SACtD1L,EAAC0O,EAAK,CAACC,KAAM7Q,EAAgC8Q,QAAS5O,EAAC8L,SACvD9L,EAAC0O,GAAMC,KAAM7Q,EAA8B8Q,QAAS5O,EAAC6N,GAAa,CAAA,KAClE7N,EAAC0O,EAAK,CAACC,KAAM7Q,EAAgC8Q,QAAS5O,EAACyG,GAAmB,CAAA,KAC1EzG,EAAC0O,EAAK,CAACC,KAAM7Q,EAA8B8Q,QAAS5O,EAACgO,GAAa,CAAA,KAClEhO,EAAC0O,EAAK,CAACC,KAAK,IAAIC,QAAS5O,EAAC6O,GAASC,GAAIhR,EAAsBiR","x_google_ignoreList":[1]}
|
|
@@ -6,8 +6,10 @@ import React from 'react';
|
|
|
6
6
|
* browser that asked for the link, which collects it from `/magic-link/check`
|
|
7
7
|
* with its pre-auth cookie. So once the link is verified, this screen tells
|
|
8
8
|
* that tab, then signs in here too when it can: when the link was opened in
|
|
9
|
-
* the same browser, which holds the same pre-auth cookie.
|
|
10
|
-
*
|
|
9
|
+
* the same browser, which holds the same pre-auth cookie.
|
|
10
|
+
*
|
|
11
|
+
* Opened on a device other than the one that asked for it, the link is held
|
|
12
|
+
* rather than used, and the screen asks whether to sign that device in.
|
|
11
13
|
*/
|
|
12
14
|
declare const VerifyMagicLink: React.FC;
|
|
13
15
|
export default VerifyMagicLink;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@seamless-auth/react",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.17.1",
|
|
4
4
|
"description": "A drop-in authentication solution for modern React applications.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"exports": {
|
|
@@ -56,7 +56,7 @@
|
|
|
56
56
|
}
|
|
57
57
|
},
|
|
58
58
|
"dependencies": {
|
|
59
|
-
"@seamless-auth/client": "^0.
|
|
59
|
+
"@seamless-auth/client": "^0.7.0",
|
|
60
60
|
"@seamless-auth/types": "^0.28.0",
|
|
61
61
|
"@simplewebauthn/browser": "^13.1.0",
|
|
62
62
|
"libphonenumber-js": "^1.12.7"
|