@tern-secure/nextjs 5.2.0-canary.v20251023005301 → 5.2.0-canary.v20251024005655

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.
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../../src/app-router/client/TernSecureProvider.tsx"],"sourcesContent":["'use client';\r\n\r\nimport { TernSecureProvider as TernSecureReactProvider } from '@tern-secure/react';\r\n\r\nimport { TernNextOptionsProvider, useTernNextOptions } from '../../boundary/NextOptionsCtx';\r\nimport type { TernSecureNextProps } from '../../types';\r\nimport { allNextProviderPropsWithEnv } from '../../utils/allNextProviderProps';\r\nimport { useAwaitablePush } from './useAwaitablePush';\r\nimport { useAwaitableReplace } from './useAwaitableReplace';\r\n\r\n\r\nconst NextClientProvider = (props: TernSecureNextProps) => {\r\n const { children } = props;\r\n\r\n const push = useAwaitablePush();\r\n const replace = useAwaitableReplace();\r\n\r\n const isNested = Boolean(useTernNextOptions());\r\n if (isNested) {\r\n return props.children;\r\n }\r\n\r\n const providerProps = allNextProviderPropsWithEnv({\r\n ...props,\r\n // @ts-expect-error Error because of the stricter types of internal `push`\r\n routerPush: push,\r\n // @ts-expect-error Error because of the stricter types of internal `replace`\r\n routerReplace: replace,\r\n });\r\n return (\r\n <TernNextOptionsProvider options={providerProps}>\r\n <TernSecureReactProvider {...providerProps}>\r\n {children}\r\n </TernSecureReactProvider>\r\n </TernNextOptionsProvider>\r\n );\r\n};\r\n\r\nexport const ClientTernSecureProvider = (props: TernSecureNextProps) => {\r\n const { children, ...rest } = props;\r\n return <NextClientProvider {...rest}>{children}</NextClientProvider>;\r\n};\r\n"],"mappings":";;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AA+BM;AA7BN,mBAA8D;AAE9D,4BAA4D;AAE5D,kCAA4C;AAC5C,8BAAiC;AACjC,iCAAoC;AAGpC,MAAM,qBAAqB,CAAC,UAA+B;AACzD,QAAM,EAAE,SAAS,IAAI;AAErB,QAAM,WAAO,0CAAiB;AAC9B,QAAM,cAAU,gDAAoB;AAEpC,QAAM,WAAW,YAAQ,0CAAmB,CAAC;AAC7C,MAAI,UAAU;AACZ,WAAO,MAAM;AAAA,EACf;AAEA,QAAM,oBAAgB,yDAA4B;AAAA,IAChD,GAAG;AAAA;AAAA,IAEH,YAAY;AAAA;AAAA,IAEZ,eAAe;AAAA,EACjB,CAAC;AACD,SACE,4CAAC,iDAAwB,SAAS,eAChC,sDAAC,aAAAA,oBAAA,EAAyB,GAAG,eAC1B,UACH,GACF;AAEJ;AAEO,MAAM,2BAA2B,CAAC,UAA+B;AACtE,QAAM,EAAE,UAAU,GAAG,KAAK,IAAI;AAC9B,SAAO,4CAAC,sBAAoB,GAAG,MAAO,UAAS;AACjD;","names":["TernSecureReactProvider"]}
1
+ {"version":3,"sources":["../../../../src/app-router/client/TernSecureProvider.tsx"],"sourcesContent":["'use client';\r\n\r\nimport { TernSecureProvider as TernSecureReactProvider } from '@tern-secure/react';\r\n\r\nimport { TernNextOptionsProvider, useTernNextOptions } from '../../boundary/NextOptionsCtx';\r\nimport type { TernSecureNextProps } from '../../types';\r\nimport { allNextProviderPropsWithEnv } from '../../utils/allNextProviderProps';\r\nimport { useAwaitablePush } from './useAwaitablePush';\r\nimport { useAwaitableReplace } from './useAwaitableReplace';\r\n\r\nconst NextClientProvider = (props: TernSecureNextProps) => {\r\n const { children } = props;\r\n\r\n const push = useAwaitablePush();\r\n const replace = useAwaitableReplace();\r\n\r\n const isNested = Boolean(useTernNextOptions());\r\n if (isNested) {\r\n return props.children;\r\n }\r\n\r\n const providerProps = allNextProviderPropsWithEnv({\r\n ...props,\r\n // @ts-expect-error Error because of the stricter types of internal `push`\r\n routerPush: push,\r\n // @ts-expect-error Error because of the stricter types of internal `replace`\r\n routerReplace: replace,\r\n });\r\n return (\r\n <TernNextOptionsProvider options={providerProps}>\r\n <TernSecureReactProvider {...providerProps}>{children}</TernSecureReactProvider>\r\n </TernNextOptionsProvider>\r\n );\r\n};\r\n\r\nexport const ClientTernSecureProvider = (props: TernSecureNextProps) => {\r\n const { children, ...rest } = props;\r\n return <NextClientProvider {...rest}>{children}</NextClientProvider>;\r\n};\r\n"],"mappings":";;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AA8BM;AA5BN,mBAA8D;AAE9D,4BAA4D;AAE5D,kCAA4C;AAC5C,8BAAiC;AACjC,iCAAoC;AAEpC,MAAM,qBAAqB,CAAC,UAA+B;AACzD,QAAM,EAAE,SAAS,IAAI;AAErB,QAAM,WAAO,0CAAiB;AAC9B,QAAM,cAAU,gDAAoB;AAEpC,QAAM,WAAW,YAAQ,0CAAmB,CAAC;AAC7C,MAAI,UAAU;AACZ,WAAO,MAAM;AAAA,EACf;AAEA,QAAM,oBAAgB,yDAA4B;AAAA,IAChD,GAAG;AAAA;AAAA,IAEH,YAAY;AAAA;AAAA,IAEZ,eAAe;AAAA,EACjB,CAAC;AACD,SACE,4CAAC,iDAAwB,SAAS,eAChC,sDAAC,aAAAA,oBAAA,EAAyB,GAAG,eAAgB,UAAS,GACxD;AAEJ;AAEO,MAAM,2BAA2B,CAAC,UAA+B;AACtE,QAAM,EAAE,UAAU,GAAG,KAAK,IAAI;AAC9B,SAAO,4CAAC,sBAAoB,GAAG,MAAO,UAAS;AACjD;","names":["TernSecureReactProvider"]}
@@ -0,0 +1,40 @@
1
+ "use strict";
2
+ var __create = Object.create;
3
+ var __defProp = Object.defineProperty;
4
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
5
+ var __getOwnPropNames = Object.getOwnPropertyNames;
6
+ var __getProtoOf = Object.getPrototypeOf;
7
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
8
+ var __export = (target, all) => {
9
+ for (var name in all)
10
+ __defProp(target, name, { get: all[name], enumerable: true });
11
+ };
12
+ var __copyProps = (to, from, except, desc) => {
13
+ if (from && typeof from === "object" || typeof from === "function") {
14
+ for (let key of __getOwnPropNames(from))
15
+ if (!__hasOwnProp.call(to, key) && key !== except)
16
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
17
+ }
18
+ return to;
19
+ };
20
+ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
21
+ // If the importer is in node compatibility mode or this is not an ESM
22
+ // file that has been converted to a CommonJS file using a Babel-
23
+ // compatible transform (i.e. "__esModule" has not been set), then set
24
+ // "default" to the CommonJS "module.exports" for node compatibility.
25
+ isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
26
+ mod
27
+ ));
28
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
29
+ var useSafeLayoutEffect_exports = {};
30
+ __export(useSafeLayoutEffect_exports, {
31
+ useSafeLayoutEffect: () => useSafeLayoutEffect
32
+ });
33
+ module.exports = __toCommonJS(useSafeLayoutEffect_exports);
34
+ var import_react = __toESM(require("react"));
35
+ const useSafeLayoutEffect = typeof window !== "undefined" ? import_react.default.useLayoutEffect : import_react.default.useEffect;
36
+ // Annotate the CommonJS export names for ESM import in node:
37
+ 0 && (module.exports = {
38
+ useSafeLayoutEffect
39
+ });
40
+ //# sourceMappingURL=useSafeLayoutEffect.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../../src/boundary/hooks/useSafeLayoutEffect.tsx"],"sourcesContent":["import React from 'react';\n\n// TODO: Import from shared once [JS-118] is done\nexport const useSafeLayoutEffect = typeof window !== 'undefined' ? React.useLayoutEffect : React.useEffect;\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,mBAAkB;AAGX,MAAM,sBAAsB,OAAO,WAAW,cAAc,aAAAA,QAAM,kBAAkB,aAAAA,QAAM;","names":["React"]}
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/types.ts"],"sourcesContent":["import type { TernSecureProviderProps } from '@tern-secure/react'\r\n\r\nimport type { ERRORS } from './errors'\r\n\r\n\r\n/**\r\n * TernSecure User\r\n */\r\n//export type TernSecureUser = FirebaseUser\r\n\r\nexport type TernSecureUserData = {\r\n uid: string\r\n email: string | null\r\n emailVerified?: boolean\r\n displayName?: string | null\r\n}\r\n\r\n\r\n/**\r\n * TernSecure Firebase configuration interface\r\n * Extends Firebase's base configuration options\r\n */\r\n//export interface TernSecureConfig extends FirebaseOptions {\r\n// apiKey: string\r\n// authDomain: string\r\n// projectId: string\r\n// storageBucket: string\r\n// messagingSenderId: string\r\n// appId: string\r\n// measurementId?: string // Optional for analytics\r\n//}\r\n\r\n/**\r\n * TernSecure initialization options\r\n */\r\nexport interface TernSecureOptions {\r\n /** Environment setting for different configurations */\r\n environment?: 'development' | 'production'\r\n /** Geographic region for data storage */\r\n region?: string\r\n /** Custom error handler */\r\n onError?: (error: Error) => void\r\n /** Debug mode flag */\r\n debug?: boolean\r\n}\r\n\r\n/**\r\n * Firebase initialization state\r\n */\r\nexport interface FirebaseState {\r\n /** Whether Firebase has been initialized */\r\n initialized: boolean\r\n /** Any initialization errors */\r\n error: Error | null\r\n /** Timestamp of last initialization attempt */\r\n lastInitAttempt?: number\r\n}\r\n\r\n/**\r\n * Configuration validation result\r\n */\r\nexport interface ConfigValidationResult {\r\n isValid: boolean\r\n errors: string[]\r\n //config: TernSecureConfig\r\n}\r\n\r\n/**\r\n * Firebase Admin configuration interface\r\n */\r\nexport interface TernSecureAdminConfig {\r\n projectId: string\r\n clientEmail: string\r\n privateKey: string\r\n}\r\n\r\n/**\r\n * Firebase Admin configuration validation result\r\n */\r\nexport interface AdminConfigValidationResult {\r\n isValid: boolean\r\n errors: string[]\r\n config: TernSecureAdminConfig\r\n}\r\n\r\n\r\nexport interface SignInResponse {\r\n success: boolean;\r\n message?: string;\r\n error?: keyof typeof ERRORS | undefined; \r\n user?: any;\r\n}\r\n\r\nexport interface AuthError extends Error {\r\n code?: string\r\n message: string\r\n response?: SignInResponse\r\n}\r\n\r\nexport function isSignInResponse(value: any): value is SignInResponse {\r\n return typeof value === \"object\" && \"success\" in value && typeof value.success === \"boolean\"\r\n}\r\n\r\n\r\nexport interface TernSecureState {\r\n userId: string | null\r\n isLoaded: boolean\r\n error: Error | null\r\n isValid: boolean\r\n isVerified: boolean\r\n isAuthenticated: boolean\r\n token: any | null\r\n email: string | null\r\n status: \"loading\" | \"authenticated\" | \"unauthenticated\" | \"unverified\"\r\n requiresVerification: boolean\r\n}\r\n\r\nexport interface RedirectConfig {\r\n // URL to redirect to after successful authentication\r\n redirectUrl?: string\r\n // Whether this is a return visit (e.g. after sign out)\r\n isReturn?: boolean\r\n // Priority of the redirect (higher number = higher priority)\r\n priority?: number\r\n}\r\n\r\n\r\nexport interface SignInProps extends RedirectConfig {\r\n onError?: (error: Error) => void\r\n onSuccess?: () => void\r\n className?: string\r\n customStyles?: {\r\n card?: string\r\n input?: string\r\n button?: string\r\n label?: string\r\n separator?: string\r\n title?: string\r\n description?: string\r\n socialButton?: string\r\n }\r\n}\r\n\r\n\r\nexport type TernSecureNextProps = TernSecureProviderProps & {\r\n apiKey?: string\r\n requiresVerification?: boolean\r\n loadingComponent?: React.ReactNode\r\n}\r\n\r\nexport interface User {\r\n uid: string\r\n email: string | null\r\n emailVerified?: boolean\r\n authTime?: number\r\n disabled?: boolean\r\n}\r\n\r\nexport interface BaseUser {\r\n uid: string\r\n email: string | null\r\n emailVerified?: boolean\r\n tenantId: string | null\r\n authTime?: number\r\n}\r\n \r\n\r\n\r\n export interface UserInfo {\r\n uid: string\r\n email: string | null\r\n emailVerified?: boolean\r\n authTime?: number\r\n disabled?: boolean\r\n }\r\n \r\n export interface SessionUser {\r\n uid: string\r\n email: string | null\r\n emailVerified: boolean\r\n disabled?: boolean\r\n }\r\n \r\n export interface SessionResult {\r\n isAuthenticated: boolean\r\n user: UserInfo | null\r\n error?: string\r\n }\r\n\r\n export type NextProviderProcessedProps = Omit<TernSecureProviderProps, 'children'>;\r\n\r\n\r\n"],"mappings":";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAmGO,SAAS,iBAAiB,OAAqC;AACpE,SAAO,OAAO,UAAU,YAAY,aAAa,SAAS,OAAO,MAAM,YAAY;AACrF;","names":[]}
1
+ {"version":3,"sources":["../../src/types.ts"],"sourcesContent":["import type { TernSecureProviderProps } from '@tern-secure/react';\r\n\r\nimport type { ERRORS } from './errors';\r\n\r\n/**\r\n * TernSecure User\r\n */\r\n//export type TernSecureUser = FirebaseUser\r\n\r\nexport type TernSecureUserData = {\r\n uid: string;\r\n email: string | null;\r\n emailVerified?: boolean;\r\n displayName?: string | null;\r\n};\r\n\r\n/**\r\n * TernSecure Firebase configuration interface\r\n * Extends Firebase's base configuration options\r\n */\r\n//export interface TernSecureConfig extends FirebaseOptions {\r\n// apiKey: string\r\n// authDomain: string\r\n// projectId: string\r\n// storageBucket: string\r\n// messagingSenderId: string\r\n// appId: string\r\n// measurementId?: string // Optional for analytics\r\n//}\r\n\r\n/**\r\n * TernSecure initialization options\r\n */\r\nexport interface TernSecureOptions {\r\n /** Environment setting for different configurations */\r\n environment?: 'development' | 'production';\r\n /** Geographic region for data storage */\r\n region?: string;\r\n /** Custom error handler */\r\n onError?: (error: Error) => void;\r\n /** Debug mode flag */\r\n debug?: boolean;\r\n}\r\n\r\n/**\r\n * Firebase initialization state\r\n */\r\nexport interface FirebaseState {\r\n /** Whether Firebase has been initialized */\r\n initialized: boolean;\r\n /** Any initialization errors */\r\n error: Error | null;\r\n /** Timestamp of last initialization attempt */\r\n lastInitAttempt?: number;\r\n}\r\n\r\n/**\r\n * Configuration validation result\r\n */\r\nexport interface ConfigValidationResult {\r\n isValid: boolean;\r\n errors: string[];\r\n //config: TernSecureConfig\r\n}\r\n\r\n/**\r\n * Firebase Admin configuration interface\r\n */\r\nexport interface TernSecureAdminConfig {\r\n projectId: string;\r\n clientEmail: string;\r\n privateKey: string;\r\n}\r\n\r\n/**\r\n * Firebase Admin configuration validation result\r\n */\r\nexport interface AdminConfigValidationResult {\r\n isValid: boolean;\r\n errors: string[];\r\n config: TernSecureAdminConfig;\r\n}\r\n\r\nexport interface SignInResponse {\r\n success: boolean;\r\n message?: string;\r\n error?: keyof typeof ERRORS | undefined;\r\n user?: any;\r\n}\r\n\r\nexport interface AuthError extends Error {\r\n code?: string;\r\n message: string;\r\n response?: SignInResponse;\r\n}\r\n\r\nexport function isSignInResponse(value: any): value is SignInResponse {\r\n return typeof value === 'object' && 'success' in value && typeof value.success === 'boolean';\r\n}\r\n\r\nexport interface TernSecureState {\r\n userId: string | null;\r\n isLoaded: boolean;\r\n error: Error | null;\r\n isValid: boolean;\r\n isVerified: boolean;\r\n isAuthenticated: boolean;\r\n token: any | null;\r\n email: string | null;\r\n status: 'loading' | 'authenticated' | 'unauthenticated' | 'unverified';\r\n requiresVerification: boolean;\r\n}\r\n\r\nexport interface RedirectConfig {\r\n // URL to redirect to after successful authentication\r\n redirectUrl?: string;\r\n // Whether this is a return visit (e.g. after sign out)\r\n isReturn?: boolean;\r\n // Priority of the redirect (higher number = higher priority)\r\n priority?: number;\r\n}\r\n\r\nexport interface SignInProps extends RedirectConfig {\r\n onError?: (error: Error) => void;\r\n onSuccess?: () => void;\r\n className?: string;\r\n customStyles?: {\r\n card?: string;\r\n input?: string;\r\n button?: string;\r\n label?: string;\r\n separator?: string;\r\n title?: string;\r\n description?: string;\r\n socialButton?: string;\r\n };\r\n}\r\n\r\nexport type TernSecureNextProps = TernSecureProviderProps & {\r\n apiKey?: string;\r\n requiresVerification?: boolean;\r\n loadingComponent?: React.ReactNode;\r\n /**\r\n * If set to true, the NextJS middleware will be invoked\r\n * every time the client-side auth state changes (sign-out, sign-in, etc.).\r\n * That way, any auth-dependent logic can be placed inside the middleware.\r\n * Example: Configuring the middleware to force a redirect to `/sign-in` when the user signs out\r\n *\r\n * @default true\r\n */\r\n __unstable_invokeMiddlewareOnAuthStateChange?: boolean;\r\n};\r\n\r\nexport interface User {\r\n uid: string;\r\n email: string | null;\r\n emailVerified?: boolean;\r\n authTime?: number;\r\n disabled?: boolean;\r\n}\r\n\r\nexport interface BaseUser {\r\n uid: string;\r\n email: string | null;\r\n emailVerified?: boolean;\r\n tenantId: string | null;\r\n authTime?: number;\r\n}\r\n\r\nexport interface UserInfo {\r\n uid: string;\r\n email: string | null;\r\n emailVerified?: boolean;\r\n authTime?: number;\r\n disabled?: boolean;\r\n}\r\n\r\nexport interface SessionUser {\r\n uid: string;\r\n email: string | null;\r\n emailVerified: boolean;\r\n disabled?: boolean;\r\n}\r\n\r\nexport interface SessionResult {\r\n isAuthenticated: boolean;\r\n user: UserInfo | null;\r\n error?: string;\r\n}\r\n\r\nexport type NextProviderProcessedProps = Omit<TernSecureProviderProps, 'children'>;\r\n"],"mappings":";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAgGO,SAAS,iBAAiB,OAAqC;AACpE,SAAO,OAAO,UAAU,YAAY,aAAa,SAAS,OAAO,MAAM,YAAY;AACrF;","names":[]}
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../../src/app-router/client/TernSecureProvider.tsx"],"sourcesContent":["'use client';\r\n\r\nimport { TernSecureProvider as TernSecureReactProvider } from '@tern-secure/react';\r\n\r\nimport { TernNextOptionsProvider, useTernNextOptions } from '../../boundary/NextOptionsCtx';\r\nimport type { TernSecureNextProps } from '../../types';\r\nimport { allNextProviderPropsWithEnv } from '../../utils/allNextProviderProps';\r\nimport { useAwaitablePush } from './useAwaitablePush';\r\nimport { useAwaitableReplace } from './useAwaitableReplace';\r\n\r\n\r\nconst NextClientProvider = (props: TernSecureNextProps) => {\r\n const { children } = props;\r\n\r\n const push = useAwaitablePush();\r\n const replace = useAwaitableReplace();\r\n\r\n const isNested = Boolean(useTernNextOptions());\r\n if (isNested) {\r\n return props.children;\r\n }\r\n\r\n const providerProps = allNextProviderPropsWithEnv({\r\n ...props,\r\n // @ts-expect-error Error because of the stricter types of internal `push`\r\n routerPush: push,\r\n // @ts-expect-error Error because of the stricter types of internal `replace`\r\n routerReplace: replace,\r\n });\r\n return (\r\n <TernNextOptionsProvider options={providerProps}>\r\n <TernSecureReactProvider {...providerProps}>\r\n {children}\r\n </TernSecureReactProvider>\r\n </TernNextOptionsProvider>\r\n );\r\n};\r\n\r\nexport const ClientTernSecureProvider = (props: TernSecureNextProps) => {\r\n const { children, ...rest } = props;\r\n return <NextClientProvider {...rest}>{children}</NextClientProvider>;\r\n};\r\n"],"mappings":";AA+BM;AA7BN,SAAS,sBAAsB,+BAA+B;AAE9D,SAAS,yBAAyB,0BAA0B;AAE5D,SAAS,mCAAmC;AAC5C,SAAS,wBAAwB;AACjC,SAAS,2BAA2B;AAGpC,MAAM,qBAAqB,CAAC,UAA+B;AACzD,QAAM,EAAE,SAAS,IAAI;AAErB,QAAM,OAAO,iBAAiB;AAC9B,QAAM,UAAU,oBAAoB;AAEpC,QAAM,WAAW,QAAQ,mBAAmB,CAAC;AAC7C,MAAI,UAAU;AACZ,WAAO,MAAM;AAAA,EACf;AAEA,QAAM,gBAAgB,4BAA4B;AAAA,IAChD,GAAG;AAAA;AAAA,IAEH,YAAY;AAAA;AAAA,IAEZ,eAAe;AAAA,EACjB,CAAC;AACD,SACE,oBAAC,2BAAwB,SAAS,eAChC,8BAAC,2BAAyB,GAAG,eAC1B,UACH,GACF;AAEJ;AAEO,MAAM,2BAA2B,CAAC,UAA+B;AACtE,QAAM,EAAE,UAAU,GAAG,KAAK,IAAI;AAC9B,SAAO,oBAAC,sBAAoB,GAAG,MAAO,UAAS;AACjD;","names":[]}
1
+ {"version":3,"sources":["../../../../src/app-router/client/TernSecureProvider.tsx"],"sourcesContent":["'use client';\r\n\r\nimport { TernSecureProvider as TernSecureReactProvider } from '@tern-secure/react';\r\n\r\nimport { TernNextOptionsProvider, useTernNextOptions } from '../../boundary/NextOptionsCtx';\r\nimport type { TernSecureNextProps } from '../../types';\r\nimport { allNextProviderPropsWithEnv } from '../../utils/allNextProviderProps';\r\nimport { useAwaitablePush } from './useAwaitablePush';\r\nimport { useAwaitableReplace } from './useAwaitableReplace';\r\n\r\nconst NextClientProvider = (props: TernSecureNextProps) => {\r\n const { children } = props;\r\n\r\n const push = useAwaitablePush();\r\n const replace = useAwaitableReplace();\r\n\r\n const isNested = Boolean(useTernNextOptions());\r\n if (isNested) {\r\n return props.children;\r\n }\r\n\r\n const providerProps = allNextProviderPropsWithEnv({\r\n ...props,\r\n // @ts-expect-error Error because of the stricter types of internal `push`\r\n routerPush: push,\r\n // @ts-expect-error Error because of the stricter types of internal `replace`\r\n routerReplace: replace,\r\n });\r\n return (\r\n <TernNextOptionsProvider options={providerProps}>\r\n <TernSecureReactProvider {...providerProps}>{children}</TernSecureReactProvider>\r\n </TernNextOptionsProvider>\r\n );\r\n};\r\n\r\nexport const ClientTernSecureProvider = (props: TernSecureNextProps) => {\r\n const { children, ...rest } = props;\r\n return <NextClientProvider {...rest}>{children}</NextClientProvider>;\r\n};\r\n"],"mappings":";AA8BM;AA5BN,SAAS,sBAAsB,+BAA+B;AAE9D,SAAS,yBAAyB,0BAA0B;AAE5D,SAAS,mCAAmC;AAC5C,SAAS,wBAAwB;AACjC,SAAS,2BAA2B;AAEpC,MAAM,qBAAqB,CAAC,UAA+B;AACzD,QAAM,EAAE,SAAS,IAAI;AAErB,QAAM,OAAO,iBAAiB;AAC9B,QAAM,UAAU,oBAAoB;AAEpC,QAAM,WAAW,QAAQ,mBAAmB,CAAC;AAC7C,MAAI,UAAU;AACZ,WAAO,MAAM;AAAA,EACf;AAEA,QAAM,gBAAgB,4BAA4B;AAAA,IAChD,GAAG;AAAA;AAAA,IAEH,YAAY;AAAA;AAAA,IAEZ,eAAe;AAAA,EACjB,CAAC;AACD,SACE,oBAAC,2BAAwB,SAAS,eAChC,8BAAC,2BAAyB,GAAG,eAAgB,UAAS,GACxD;AAEJ;AAEO,MAAM,2BAA2B,CAAC,UAA+B;AACtE,QAAM,EAAE,UAAU,GAAG,KAAK,IAAI;AAC9B,SAAO,oBAAC,sBAAoB,GAAG,MAAO,UAAS;AACjD;","names":[]}
@@ -0,0 +1,6 @@
1
+ import React from "react";
2
+ const useSafeLayoutEffect = typeof window !== "undefined" ? React.useLayoutEffect : React.useEffect;
3
+ export {
4
+ useSafeLayoutEffect
5
+ };
6
+ //# sourceMappingURL=useSafeLayoutEffect.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../../src/boundary/hooks/useSafeLayoutEffect.tsx"],"sourcesContent":["import React from 'react';\n\n// TODO: Import from shared once [JS-118] is done\nexport const useSafeLayoutEffect = typeof window !== 'undefined' ? React.useLayoutEffect : React.useEffect;\n"],"mappings":"AAAA,OAAO,WAAW;AAGX,MAAM,sBAAsB,OAAO,WAAW,cAAc,MAAM,kBAAkB,MAAM;","names":[]}
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/types.ts"],"sourcesContent":["import type { TernSecureProviderProps } from '@tern-secure/react'\r\n\r\nimport type { ERRORS } from './errors'\r\n\r\n\r\n/**\r\n * TernSecure User\r\n */\r\n//export type TernSecureUser = FirebaseUser\r\n\r\nexport type TernSecureUserData = {\r\n uid: string\r\n email: string | null\r\n emailVerified?: boolean\r\n displayName?: string | null\r\n}\r\n\r\n\r\n/**\r\n * TernSecure Firebase configuration interface\r\n * Extends Firebase's base configuration options\r\n */\r\n//export interface TernSecureConfig extends FirebaseOptions {\r\n// apiKey: string\r\n// authDomain: string\r\n// projectId: string\r\n// storageBucket: string\r\n// messagingSenderId: string\r\n// appId: string\r\n// measurementId?: string // Optional for analytics\r\n//}\r\n\r\n/**\r\n * TernSecure initialization options\r\n */\r\nexport interface TernSecureOptions {\r\n /** Environment setting for different configurations */\r\n environment?: 'development' | 'production'\r\n /** Geographic region for data storage */\r\n region?: string\r\n /** Custom error handler */\r\n onError?: (error: Error) => void\r\n /** Debug mode flag */\r\n debug?: boolean\r\n}\r\n\r\n/**\r\n * Firebase initialization state\r\n */\r\nexport interface FirebaseState {\r\n /** Whether Firebase has been initialized */\r\n initialized: boolean\r\n /** Any initialization errors */\r\n error: Error | null\r\n /** Timestamp of last initialization attempt */\r\n lastInitAttempt?: number\r\n}\r\n\r\n/**\r\n * Configuration validation result\r\n */\r\nexport interface ConfigValidationResult {\r\n isValid: boolean\r\n errors: string[]\r\n //config: TernSecureConfig\r\n}\r\n\r\n/**\r\n * Firebase Admin configuration interface\r\n */\r\nexport interface TernSecureAdminConfig {\r\n projectId: string\r\n clientEmail: string\r\n privateKey: string\r\n}\r\n\r\n/**\r\n * Firebase Admin configuration validation result\r\n */\r\nexport interface AdminConfigValidationResult {\r\n isValid: boolean\r\n errors: string[]\r\n config: TernSecureAdminConfig\r\n}\r\n\r\n\r\nexport interface SignInResponse {\r\n success: boolean;\r\n message?: string;\r\n error?: keyof typeof ERRORS | undefined; \r\n user?: any;\r\n}\r\n\r\nexport interface AuthError extends Error {\r\n code?: string\r\n message: string\r\n response?: SignInResponse\r\n}\r\n\r\nexport function isSignInResponse(value: any): value is SignInResponse {\r\n return typeof value === \"object\" && \"success\" in value && typeof value.success === \"boolean\"\r\n}\r\n\r\n\r\nexport interface TernSecureState {\r\n userId: string | null\r\n isLoaded: boolean\r\n error: Error | null\r\n isValid: boolean\r\n isVerified: boolean\r\n isAuthenticated: boolean\r\n token: any | null\r\n email: string | null\r\n status: \"loading\" | \"authenticated\" | \"unauthenticated\" | \"unverified\"\r\n requiresVerification: boolean\r\n}\r\n\r\nexport interface RedirectConfig {\r\n // URL to redirect to after successful authentication\r\n redirectUrl?: string\r\n // Whether this is a return visit (e.g. after sign out)\r\n isReturn?: boolean\r\n // Priority of the redirect (higher number = higher priority)\r\n priority?: number\r\n}\r\n\r\n\r\nexport interface SignInProps extends RedirectConfig {\r\n onError?: (error: Error) => void\r\n onSuccess?: () => void\r\n className?: string\r\n customStyles?: {\r\n card?: string\r\n input?: string\r\n button?: string\r\n label?: string\r\n separator?: string\r\n title?: string\r\n description?: string\r\n socialButton?: string\r\n }\r\n}\r\n\r\n\r\nexport type TernSecureNextProps = TernSecureProviderProps & {\r\n apiKey?: string\r\n requiresVerification?: boolean\r\n loadingComponent?: React.ReactNode\r\n}\r\n\r\nexport interface User {\r\n uid: string\r\n email: string | null\r\n emailVerified?: boolean\r\n authTime?: number\r\n disabled?: boolean\r\n}\r\n\r\nexport interface BaseUser {\r\n uid: string\r\n email: string | null\r\n emailVerified?: boolean\r\n tenantId: string | null\r\n authTime?: number\r\n}\r\n \r\n\r\n\r\n export interface UserInfo {\r\n uid: string\r\n email: string | null\r\n emailVerified?: boolean\r\n authTime?: number\r\n disabled?: boolean\r\n }\r\n \r\n export interface SessionUser {\r\n uid: string\r\n email: string | null\r\n emailVerified: boolean\r\n disabled?: boolean\r\n }\r\n \r\n export interface SessionResult {\r\n isAuthenticated: boolean\r\n user: UserInfo | null\r\n error?: string\r\n }\r\n\r\n export type NextProviderProcessedProps = Omit<TernSecureProviderProps, 'children'>;\r\n\r\n\r\n"],"mappings":"AAmGO,SAAS,iBAAiB,OAAqC;AACpE,SAAO,OAAO,UAAU,YAAY,aAAa,SAAS,OAAO,MAAM,YAAY;AACrF;","names":[]}
1
+ {"version":3,"sources":["../../src/types.ts"],"sourcesContent":["import type { TernSecureProviderProps } from '@tern-secure/react';\r\n\r\nimport type { ERRORS } from './errors';\r\n\r\n/**\r\n * TernSecure User\r\n */\r\n//export type TernSecureUser = FirebaseUser\r\n\r\nexport type TernSecureUserData = {\r\n uid: string;\r\n email: string | null;\r\n emailVerified?: boolean;\r\n displayName?: string | null;\r\n};\r\n\r\n/**\r\n * TernSecure Firebase configuration interface\r\n * Extends Firebase's base configuration options\r\n */\r\n//export interface TernSecureConfig extends FirebaseOptions {\r\n// apiKey: string\r\n// authDomain: string\r\n// projectId: string\r\n// storageBucket: string\r\n// messagingSenderId: string\r\n// appId: string\r\n// measurementId?: string // Optional for analytics\r\n//}\r\n\r\n/**\r\n * TernSecure initialization options\r\n */\r\nexport interface TernSecureOptions {\r\n /** Environment setting for different configurations */\r\n environment?: 'development' | 'production';\r\n /** Geographic region for data storage */\r\n region?: string;\r\n /** Custom error handler */\r\n onError?: (error: Error) => void;\r\n /** Debug mode flag */\r\n debug?: boolean;\r\n}\r\n\r\n/**\r\n * Firebase initialization state\r\n */\r\nexport interface FirebaseState {\r\n /** Whether Firebase has been initialized */\r\n initialized: boolean;\r\n /** Any initialization errors */\r\n error: Error | null;\r\n /** Timestamp of last initialization attempt */\r\n lastInitAttempt?: number;\r\n}\r\n\r\n/**\r\n * Configuration validation result\r\n */\r\nexport interface ConfigValidationResult {\r\n isValid: boolean;\r\n errors: string[];\r\n //config: TernSecureConfig\r\n}\r\n\r\n/**\r\n * Firebase Admin configuration interface\r\n */\r\nexport interface TernSecureAdminConfig {\r\n projectId: string;\r\n clientEmail: string;\r\n privateKey: string;\r\n}\r\n\r\n/**\r\n * Firebase Admin configuration validation result\r\n */\r\nexport interface AdminConfigValidationResult {\r\n isValid: boolean;\r\n errors: string[];\r\n config: TernSecureAdminConfig;\r\n}\r\n\r\nexport interface SignInResponse {\r\n success: boolean;\r\n message?: string;\r\n error?: keyof typeof ERRORS | undefined;\r\n user?: any;\r\n}\r\n\r\nexport interface AuthError extends Error {\r\n code?: string;\r\n message: string;\r\n response?: SignInResponse;\r\n}\r\n\r\nexport function isSignInResponse(value: any): value is SignInResponse {\r\n return typeof value === 'object' && 'success' in value && typeof value.success === 'boolean';\r\n}\r\n\r\nexport interface TernSecureState {\r\n userId: string | null;\r\n isLoaded: boolean;\r\n error: Error | null;\r\n isValid: boolean;\r\n isVerified: boolean;\r\n isAuthenticated: boolean;\r\n token: any | null;\r\n email: string | null;\r\n status: 'loading' | 'authenticated' | 'unauthenticated' | 'unverified';\r\n requiresVerification: boolean;\r\n}\r\n\r\nexport interface RedirectConfig {\r\n // URL to redirect to after successful authentication\r\n redirectUrl?: string;\r\n // Whether this is a return visit (e.g. after sign out)\r\n isReturn?: boolean;\r\n // Priority of the redirect (higher number = higher priority)\r\n priority?: number;\r\n}\r\n\r\nexport interface SignInProps extends RedirectConfig {\r\n onError?: (error: Error) => void;\r\n onSuccess?: () => void;\r\n className?: string;\r\n customStyles?: {\r\n card?: string;\r\n input?: string;\r\n button?: string;\r\n label?: string;\r\n separator?: string;\r\n title?: string;\r\n description?: string;\r\n socialButton?: string;\r\n };\r\n}\r\n\r\nexport type TernSecureNextProps = TernSecureProviderProps & {\r\n apiKey?: string;\r\n requiresVerification?: boolean;\r\n loadingComponent?: React.ReactNode;\r\n /**\r\n * If set to true, the NextJS middleware will be invoked\r\n * every time the client-side auth state changes (sign-out, sign-in, etc.).\r\n * That way, any auth-dependent logic can be placed inside the middleware.\r\n * Example: Configuring the middleware to force a redirect to `/sign-in` when the user signs out\r\n *\r\n * @default true\r\n */\r\n __unstable_invokeMiddlewareOnAuthStateChange?: boolean;\r\n};\r\n\r\nexport interface User {\r\n uid: string;\r\n email: string | null;\r\n emailVerified?: boolean;\r\n authTime?: number;\r\n disabled?: boolean;\r\n}\r\n\r\nexport interface BaseUser {\r\n uid: string;\r\n email: string | null;\r\n emailVerified?: boolean;\r\n tenantId: string | null;\r\n authTime?: number;\r\n}\r\n\r\nexport interface UserInfo {\r\n uid: string;\r\n email: string | null;\r\n emailVerified?: boolean;\r\n authTime?: number;\r\n disabled?: boolean;\r\n}\r\n\r\nexport interface SessionUser {\r\n uid: string;\r\n email: string | null;\r\n emailVerified: boolean;\r\n disabled?: boolean;\r\n}\r\n\r\nexport interface SessionResult {\r\n isAuthenticated: boolean;\r\n user: UserInfo | null;\r\n error?: string;\r\n}\r\n\r\nexport type NextProviderProcessedProps = Omit<TernSecureProviderProps, 'children'>;\r\n"],"mappings":"AAgGO,SAAS,iBAAiB,OAAqC;AACpE,SAAO,OAAO,UAAU,YAAY,aAAa,SAAS,OAAO,MAAM,YAAY;AACrF;","names":[]}
@@ -1 +1 @@
1
- {"version":3,"file":"TernSecureProvider.d.ts","sourceRoot":"","sources":["../../../../src/app-router/client/TernSecureProvider.tsx"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,aAAa,CAAC;AAiCvD,eAAO,MAAM,wBAAwB,GAAI,OAAO,mBAAmB,4CAGlE,CAAC"}
1
+ {"version":3,"file":"TernSecureProvider.d.ts","sourceRoot":"","sources":["../../../../src/app-router/client/TernSecureProvider.tsx"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,aAAa,CAAC;AA8BvD,eAAO,MAAM,wBAAwB,GAAI,OAAO,mBAAmB,4CAGlE,CAAC"}
@@ -0,0 +1,3 @@
1
+ import React from 'react';
2
+ export declare const useSafeLayoutEffect: typeof React.useEffect;
3
+ //# sourceMappingURL=useSafeLayoutEffect.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useSafeLayoutEffect.d.ts","sourceRoot":"","sources":["../../../../src/boundary/hooks/useSafeLayoutEffect.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAG1B,eAAO,MAAM,mBAAmB,wBAA0E,CAAC"}
@@ -81,7 +81,7 @@ export interface TernSecureState {
81
81
  isAuthenticated: boolean;
82
82
  token: any | null;
83
83
  email: string | null;
84
- status: "loading" | "authenticated" | "unauthenticated" | "unverified";
84
+ status: 'loading' | 'authenticated' | 'unauthenticated' | 'unverified';
85
85
  requiresVerification: boolean;
86
86
  }
87
87
  export interface RedirectConfig {
@@ -108,6 +108,15 @@ export type TernSecureNextProps = TernSecureProviderProps & {
108
108
  apiKey?: string;
109
109
  requiresVerification?: boolean;
110
110
  loadingComponent?: React.ReactNode;
111
+ /**
112
+ * If set to true, the NextJS middleware will be invoked
113
+ * every time the client-side auth state changes (sign-out, sign-in, etc.).
114
+ * That way, any auth-dependent logic can be placed inside the middleware.
115
+ * Example: Configuring the middleware to force a redirect to `/sign-in` when the user signs out
116
+ *
117
+ * @default true
118
+ */
119
+ __unstable_invokeMiddlewareOnAuthStateChange?: boolean;
111
120
  };
112
121
  export interface User {
113
122
  uid: string;
@@ -1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ACxB,QAAQ,CAAC,EAAE,MAAM,CAAC;CACnB;AAED,MAAM,WAAW,QAAQ;IACvB,GAAG,EAAE,MAAM,CAAC;IACZ,KAAK,EAAE,MAAM,GAAG,IAAI,CAAC;IACrB,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB;AAED,MAAM,WAAW,WAAW;IAC1B,GAAG,EAAE,MAAM,CAAC;IACZ,KAAK,EAAE,MAAM,GAAG,IAAI,CAAC;IACrB,aAAa,EAAE,OAAO,CAAC;IACvB,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB;AAED,MAAM,WAAW,aAAa;IAC5B,eAAe,EAAE,OAAO,CAAC;IACzB,IAAI,EAAE,QAAQ,GAAG,IAAI,CAAC;IACtB,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AAED,MAAM,MAAM,0BAA0B,GAAG,IAAI,CAAC,uBAAuB,EAAE,UAAU,CAAC,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tern-secure/nextjs",
3
- "version": "5.2.0-canary.v20251023005301",
3
+ "version": "5.2.0-canary.v20251024005655",
4
4
  "publishConfig": {
5
5
  "access": "public"
6
6
  },
@@ -63,10 +63,10 @@
63
63
  "jose": "^5.9.6",
64
64
  "server-only": "^0.0.1",
65
65
  "tslib": "2.4.1",
66
- "@tern-secure/backend": "1.2.0-canary.v20251023005301",
67
- "@tern-secure/react": "1.2.0-canary.v20251023005301",
68
- "@tern-secure/shared": "1.3.0-canary.v20251023005301",
69
- "@tern-secure/types": "1.1.0-canary.v20251023005301"
66
+ "@tern-secure/backend": "1.2.0-canary.v20251024005655",
67
+ "@tern-secure/react": "1.2.0-canary.v20251024005655",
68
+ "@tern-secure/shared": "1.3.0-canary.v20251024005655",
69
+ "@tern-secure/types": "1.1.0-canary.v20251024005655"
70
70
  },
71
71
  "peerDependencies": {
72
72
  "next": "^13.0.0 || ^14.0.0 || ^15.0.0",