@tern-secure/auth 1.1.0-canary.v20251108045933 → 1.1.0-canary.v20251127221555

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.
Files changed (276) hide show
  1. package/dist/492_ternsecure_b693ad_1.1.0-canary.v20251127221555.js +1 -0
  2. package/dist/687_ternsecure_b693ad_1.1.0-canary.v20251127221555.js +1 -0
  3. package/dist/68_ternsecure_b693ad_1.1.0-canary.v20251127221555.js +1 -0
  4. package/dist/framework_ternsecure_b693ad_1.1.0-canary.v20251127221555.js +1 -0
  5. package/dist/signin_ternsecure_b693ad_1.1.0-canary.v20251127221555.css +2 -0
  6. package/dist/signin_ternsecure_b693ad_1.1.0-canary.v20251127221555.js +1 -0
  7. package/dist/signup_ternsecure_b693ad_1.1.0-canary.v20251127221555.css +2 -0
  8. package/dist/signup_ternsecure_b693ad_1.1.0-canary.v20251127221555.js +1 -0
  9. package/dist/ternsecure.browser.js +30 -0
  10. package/dist/ternsecure.css +2 -0
  11. package/dist/ternsecure.js +17 -0
  12. package/dist/ternsecure.mjs +17 -0
  13. package/dist/types/auth/AuthCookieManager.d.ts +0 -1
  14. package/dist/types/auth/cookies/authTime_cookie.d.ts +0 -1
  15. package/dist/types/index.browser.d.ts +1 -0
  16. package/dist/types/index.d.ts +3 -10
  17. package/dist/types/instance/c_coreApiClient.d.ts +2 -2
  18. package/dist/types/instance/constants.d.ts +3 -0
  19. package/dist/types/instance/coreApiClient.d.ts +0 -1
  20. package/dist/types/instance/events.d.ts +0 -1
  21. package/dist/types/instance/fraudProtection.d.ts +7 -0
  22. package/dist/types/instance/{TernAuth.d.ts → ternsecure.d.ts} +37 -7
  23. package/dist/types/lib/utils.d.ts +2 -0
  24. package/dist/types/resources/Base.d.ts +17 -3
  25. package/dist/types/resources/Error.d.ts +0 -1
  26. package/dist/types/resources/Session.d.ts +2 -2
  27. package/dist/types/resources/SignIn.d.ts +27 -10
  28. package/dist/types/resources/SignUp.d.ts +12 -10
  29. package/dist/types/resources/internal.d.ts +1 -2
  30. package/dist/types/ui/Renderer.d.ts +26 -0
  31. package/dist/types/ui/common/ProviderInitialIcon.d.ts +6 -0
  32. package/dist/types/ui/common/VerificationCodeCard.d.ts +12 -0
  33. package/dist/types/ui/common/VerificationLinkCard.d.ts +7 -0
  34. package/dist/types/ui/common/constants.d.ts +8 -0
  35. package/dist/types/ui/common/index.d.ts +3 -0
  36. package/dist/types/ui/components/sign-in/ResetPassword.d.ts +1 -0
  37. package/dist/types/ui/components/sign-in/ResetPasswordSuccess.d.ts +1 -0
  38. package/dist/types/ui/components/sign-in/SignIn.d.ts +4 -0
  39. package/dist/types/ui/components/sign-in/SignInEmailLinkCard.d.ts +2 -0
  40. package/dist/types/ui/components/sign-in/SignInFactorOne.d.ts +1 -0
  41. package/dist/types/ui/components/sign-in/SignInFactorOneCodeForm.d.ts +7 -0
  42. package/dist/types/ui/components/sign-in/SignInFactorOnePasswordCard.d.ts +6 -0
  43. package/dist/types/ui/components/sign-in/SignInFactorOnePhoneCodeCard.d.ts +7 -0
  44. package/dist/types/ui/components/sign-in/SignInPassword.d.ts +8 -0
  45. package/dist/types/ui/components/sign-in/SignInSocialButtons.d.ts +1 -0
  46. package/dist/types/ui/components/sign-in/SignInStart.d.ts +7 -0
  47. package/dist/types/ui/components/sign-in/SignInVerifyEmail.d.ts +1 -0
  48. package/dist/types/ui/components/sign-in/index.d.ts +4 -0
  49. package/dist/types/ui/components/sign-up/SignUp.d.ts +8 -0
  50. package/dist/types/ui/components/sign-up/SignUpEmailLinkCard.d.ts +2 -0
  51. package/dist/types/ui/components/sign-up/SignUpSocialButtons.d.ts +1 -0
  52. package/dist/types/ui/components/sign-up/SignUpStart.d.ts +1 -0
  53. package/dist/types/ui/components/sign-up/SignUpVerifyEmail.d.ts +1 -0
  54. package/dist/types/ui/components/sign-up/index.d.ts +2 -0
  55. package/dist/types/ui/components/sign-up/util.d.ts +14 -0
  56. package/dist/types/ui/components/user-button/index.d.ts +1 -0
  57. package/dist/types/ui/components/user-button/userButton.d.ts +1 -0
  58. package/dist/types/ui/ctx/TernAuthContext.d.ts +4 -0
  59. package/dist/types/ui/ctx/TernAuthUIComponentCtx.d.ts +8 -0
  60. package/dist/types/ui/ctx/TernSecureContextWrapper.d.ts +8 -0
  61. package/dist/types/ui/ctx/TernSecureOptions.d.ts +10 -0
  62. package/dist/types/ui/ctx/components/SignIn.d.ts +21 -0
  63. package/dist/types/ui/ctx/components/SignUp.d.ts +14 -0
  64. package/dist/types/ui/ctx/components/UserButton.d.ts +10 -0
  65. package/dist/types/ui/ctx/components/index.d.ts +3 -0
  66. package/dist/types/ui/ctx/index.d.ts +4 -0
  67. package/dist/types/ui/ctx/utils.d.ts +3 -0
  68. package/dist/types/ui/customize/FieldControl.d.ts +21 -0
  69. package/dist/types/ui/customize/FieldLabelControl.d.ts +11 -0
  70. package/dist/types/ui/customize/Form.d.ts +36 -0
  71. package/dist/types/ui/elements/CodeControl.d.ts +47 -0
  72. package/dist/types/ui/elements/ErrorCard.d.ts +10 -0
  73. package/dist/types/ui/elements/LoadingCard.d.ts +1 -0
  74. package/dist/types/ui/elements/RouterLink.d.ts +42 -0
  75. package/dist/types/ui/elements/SocialButtons.d.ts +6 -0
  76. package/dist/types/ui/elements/TimerButton.d.ts +9 -0
  77. package/dist/types/ui/elements/alert.d.ts +8 -0
  78. package/dist/types/ui/elements/avatar.d.ts +6 -0
  79. package/dist/types/ui/elements/button.d.ts +10 -0
  80. package/dist/types/ui/elements/card.d.ts +9 -0
  81. package/dist/types/ui/elements/ctx/CardStateCtx.d.ts +26 -0
  82. package/dist/types/ui/elements/ctx/index.d.ts +1 -0
  83. package/dist/types/ui/elements/field.d.ts +24 -0
  84. package/dist/types/ui/elements/index.d.ts +16 -0
  85. package/dist/types/ui/elements/input.d.ts +3 -0
  86. package/dist/types/ui/elements/label.d.ts +4 -0
  87. package/dist/types/ui/elements/separator.d.ts +4 -0
  88. package/dist/types/ui/hooks/index.d.ts +6 -0
  89. package/dist/types/ui/hooks/useEmailLink.d.ts +11 -0
  90. package/dist/types/ui/hooks/useFetch.d.ts +44 -0
  91. package/dist/types/ui/hooks/useLoadingStatus.d.ts +14 -0
  92. package/dist/types/ui/hooks/useNavigateToFlowStart.d.ts +3 -0
  93. package/dist/types/ui/hooks/useSafeState.d.ts +9 -0
  94. package/dist/types/ui/hooks/useWindowEventListener.d.ts +3 -0
  95. package/dist/types/ui/icons/index.d.ts +13 -0
  96. package/dist/types/ui/lazyLoading/common.d.ts +2 -0
  97. package/dist/types/ui/lazyLoading/components.d.ts +11 -0
  98. package/dist/types/ui/lazyLoading/providersCtx.d.ts +26 -0
  99. package/dist/types/ui/portal/index.d.ts +12 -0
  100. package/dist/types/ui/router/BaseRouter.d.ts +21 -0
  101. package/dist/types/ui/router/HashRouter.d.ts +8 -0
  102. package/dist/types/ui/router/PathRouter.d.ts +8 -0
  103. package/dist/types/ui/router/Route.d.ts +19 -0
  104. package/dist/types/ui/router/RouterCtx.d.ts +32 -0
  105. package/dist/types/ui/router/Switch.d.ts +4 -0
  106. package/dist/types/ui/router/index.d.ts +7 -0
  107. package/dist/types/ui/router/newPaths.d.ts +1 -0
  108. package/dist/types/ui/router/pathToRegexp.d.ts +127 -0
  109. package/dist/types/ui/types.d.ts +18 -0
  110. package/dist/types/ui/utils/form.d.ts +19 -0
  111. package/dist/types/ui/utils/index.d.ts +1 -0
  112. package/dist/types/ui/utils/sleep.d.ts +1 -0
  113. package/dist/types/utils/construct.d.ts +3 -1
  114. package/dist/types/utils/index.d.ts +1 -1
  115. package/dist/types/utils/normalizeRoutingOptions.d.ts +6 -0
  116. package/dist/types/utils/path.d.ts +0 -1
  117. package/dist/types/utils/querystring.d.ts +0 -1
  118. package/dist/types/utils/redirectUrls.d.ts +4 -9
  119. package/dist/types/utils/windowNavigate.d.ts +0 -1
  120. package/dist/ui-common_ternsecure_b693ad_1.1.0-canary.v20251127221555.js +1 -0
  121. package/dist/userbutton_ternsecure_b693ad_1.1.0-canary.v20251127221555.js +1 -0
  122. package/dist/vendors_ternsecure_b693ad_1.1.0-canary.v20251127221555.js +1 -0
  123. package/package.json +63 -24
  124. package/dist/cjs/auth/AuthCookieManager.js +0 -113
  125. package/dist/cjs/auth/AuthCookieManager.js.map +0 -1
  126. package/dist/cjs/auth/cookies/authTime_cookie.js +0 -62
  127. package/dist/cjs/auth/cookies/authTime_cookie.js.map +0 -1
  128. package/dist/cjs/auth/request.js +0 -159
  129. package/dist/cjs/auth/request.js.map +0 -1
  130. package/dist/cjs/global.d.js +0 -2
  131. package/dist/cjs/global.d.js.map +0 -1
  132. package/dist/cjs/index.js +0 -47
  133. package/dist/cjs/index.js.map +0 -1
  134. package/dist/cjs/instance/TernAuth.js +0 -524
  135. package/dist/cjs/instance/TernAuth.js.map +0 -1
  136. package/dist/cjs/instance/TernAuthServer.js +0 -95
  137. package/dist/cjs/instance/TernAuthServer.js.map +0 -1
  138. package/dist/cjs/instance/c_coreApiClient.js +0 -264
  139. package/dist/cjs/instance/c_coreApiClient.js.map +0 -1
  140. package/dist/cjs/instance/coreApiClient.js +0 -255
  141. package/dist/cjs/instance/coreApiClient.js.map +0 -1
  142. package/dist/cjs/instance/events.js +0 -39
  143. package/dist/cjs/instance/events.js.map +0 -1
  144. package/dist/cjs/instance/jwtClient.js +0 -72
  145. package/dist/cjs/instance/jwtClient.js.map +0 -1
  146. package/dist/cjs/resources/Base.js +0 -137
  147. package/dist/cjs/resources/Base.js.map +0 -1
  148. package/dist/cjs/resources/Error.js +0 -31
  149. package/dist/cjs/resources/Error.js.map +0 -1
  150. package/dist/cjs/resources/Session.js +0 -105
  151. package/dist/cjs/resources/Session.js.map +0 -1
  152. package/dist/cjs/resources/SignIn.js +0 -256
  153. package/dist/cjs/resources/SignIn.js.map +0 -1
  154. package/dist/cjs/resources/SignUp.js +0 -72
  155. package/dist/cjs/resources/SignUp.js.map +0 -1
  156. package/dist/cjs/resources/Token.js +0 -32
  157. package/dist/cjs/resources/Token.js.map +0 -1
  158. package/dist/cjs/resources/UserData.js +0 -43
  159. package/dist/cjs/resources/UserData.js.map +0 -1
  160. package/dist/cjs/resources/cookie.js +0 -154
  161. package/dist/cjs/resources/cookie.js.map +0 -1
  162. package/dist/cjs/resources/index.js +0 -23
  163. package/dist/cjs/resources/index.js.map +0 -1
  164. package/dist/cjs/resources/internal.js +0 -35
  165. package/dist/cjs/resources/internal.js.map +0 -1
  166. package/dist/cjs/utils/construct.js +0 -253
  167. package/dist/cjs/utils/construct.js.map +0 -1
  168. package/dist/cjs/utils/index.js +0 -29
  169. package/dist/cjs/utils/index.js.map +0 -1
  170. package/dist/cjs/utils/jwt.js +0 -46
  171. package/dist/cjs/utils/jwt.js.map +0 -1
  172. package/dist/cjs/utils/mapDecode.js +0 -33
  173. package/dist/cjs/utils/mapDecode.js.map +0 -1
  174. package/dist/cjs/utils/path.js +0 -33
  175. package/dist/cjs/utils/path.js.map +0 -1
  176. package/dist/cjs/utils/querystring.js +0 -70
  177. package/dist/cjs/utils/querystring.js.map +0 -1
  178. package/dist/cjs/utils/redirectUrls.js +0 -156
  179. package/dist/cjs/utils/redirectUrls.js.map +0 -1
  180. package/dist/cjs/utils/windowNavigate.js +0 -45
  181. package/dist/cjs/utils/windowNavigate.js.map +0 -1
  182. package/dist/esm/auth/AuthCookieManager.js +0 -89
  183. package/dist/esm/auth/AuthCookieManager.js.map +0 -1
  184. package/dist/esm/auth/cookies/authTime_cookie.js +0 -38
  185. package/dist/esm/auth/cookies/authTime_cookie.js.map +0 -1
  186. package/dist/esm/auth/request.js +0 -134
  187. package/dist/esm/auth/request.js.map +0 -1
  188. package/dist/esm/global.d.js +0 -1
  189. package/dist/esm/global.d.js.map +0 -1
  190. package/dist/esm/index.js +0 -16
  191. package/dist/esm/index.js.map +0 -1
  192. package/dist/esm/instance/TernAuth.js +0 -510
  193. package/dist/esm/instance/TernAuth.js.map +0 -1
  194. package/dist/esm/instance/TernAuthServer.js +0 -73
  195. package/dist/esm/instance/TernAuthServer.js.map +0 -1
  196. package/dist/esm/instance/c_coreApiClient.js +0 -236
  197. package/dist/esm/instance/c_coreApiClient.js.map +0 -1
  198. package/dist/esm/instance/coreApiClient.js +0 -226
  199. package/dist/esm/instance/coreApiClient.js.map +0 -1
  200. package/dist/esm/instance/events.js +0 -14
  201. package/dist/esm/instance/events.js.map +0 -1
  202. package/dist/esm/instance/jwtClient.js +0 -47
  203. package/dist/esm/instance/jwtClient.js.map +0 -1
  204. package/dist/esm/resources/Base.js +0 -113
  205. package/dist/esm/resources/Base.js.map +0 -1
  206. package/dist/esm/resources/Error.js +0 -9
  207. package/dist/esm/resources/Error.js.map +0 -1
  208. package/dist/esm/resources/Session.js +0 -81
  209. package/dist/esm/resources/Session.js.map +0 -1
  210. package/dist/esm/resources/SignIn.js +0 -240
  211. package/dist/esm/resources/SignIn.js.map +0 -1
  212. package/dist/esm/resources/SignUp.js +0 -48
  213. package/dist/esm/resources/SignUp.js.map +0 -1
  214. package/dist/esm/resources/Token.js +0 -8
  215. package/dist/esm/resources/Token.js.map +0 -1
  216. package/dist/esm/resources/UserData.js +0 -19
  217. package/dist/esm/resources/UserData.js.map +0 -1
  218. package/dist/esm/resources/cookie.js +0 -130
  219. package/dist/esm/resources/cookie.js.map +0 -1
  220. package/dist/esm/resources/index.js +0 -2
  221. package/dist/esm/resources/index.js.map +0 -1
  222. package/dist/esm/resources/internal.js +0 -8
  223. package/dist/esm/resources/internal.js.map +0 -1
  224. package/dist/esm/utils/construct.js +0 -215
  225. package/dist/esm/utils/construct.js.map +0 -1
  226. package/dist/esm/utils/index.js +0 -5
  227. package/dist/esm/utils/index.js.map +0 -1
  228. package/dist/esm/utils/jwt.js +0 -22
  229. package/dist/esm/utils/jwt.js.map +0 -1
  230. package/dist/esm/utils/mapDecode.js +0 -9
  231. package/dist/esm/utils/mapDecode.js.map +0 -1
  232. package/dist/esm/utils/path.js +0 -9
  233. package/dist/esm/utils/path.js.map +0 -1
  234. package/dist/esm/utils/querystring.js +0 -45
  235. package/dist/esm/utils/querystring.js.map +0 -1
  236. package/dist/esm/utils/redirectUrls.js +0 -132
  237. package/dist/esm/utils/redirectUrls.js.map +0 -1
  238. package/dist/esm/utils/windowNavigate.js +0 -19
  239. package/dist/esm/utils/windowNavigate.js.map +0 -1
  240. package/dist/types/auth/AuthCookieManager.d.ts.map +0 -1
  241. package/dist/types/auth/cookies/authTime_cookie.d.ts.map +0 -1
  242. package/dist/types/auth/request.d.ts +0 -49
  243. package/dist/types/auth/request.d.ts.map +0 -1
  244. package/dist/types/index.d.ts.map +0 -1
  245. package/dist/types/instance/TernAuth.d.ts.map +0 -1
  246. package/dist/types/instance/TernAuthServer.d.ts +0 -32
  247. package/dist/types/instance/TernAuthServer.d.ts.map +0 -1
  248. package/dist/types/instance/c_coreApiClient.d.ts.map +0 -1
  249. package/dist/types/instance/coreApiClient.d.ts.map +0 -1
  250. package/dist/types/instance/events.d.ts.map +0 -1
  251. package/dist/types/instance/jwtClient.d.ts +0 -22
  252. package/dist/types/instance/jwtClient.d.ts.map +0 -1
  253. package/dist/types/resources/Base.d.ts.map +0 -1
  254. package/dist/types/resources/Error.d.ts.map +0 -1
  255. package/dist/types/resources/Session.d.ts.map +0 -1
  256. package/dist/types/resources/SignIn.d.ts.map +0 -1
  257. package/dist/types/resources/SignUp.d.ts.map +0 -1
  258. package/dist/types/resources/Token.d.ts +0 -5
  259. package/dist/types/resources/Token.d.ts.map +0 -1
  260. package/dist/types/resources/UserData.d.ts +0 -8
  261. package/dist/types/resources/UserData.d.ts.map +0 -1
  262. package/dist/types/resources/cookie.d.ts +0 -24
  263. package/dist/types/resources/cookie.d.ts.map +0 -1
  264. package/dist/types/resources/index.d.ts +0 -2
  265. package/dist/types/resources/index.d.ts.map +0 -1
  266. package/dist/types/resources/internal.d.ts.map +0 -1
  267. package/dist/types/utils/construct.d.ts.map +0 -1
  268. package/dist/types/utils/index.d.ts.map +0 -1
  269. package/dist/types/utils/jwt.d.ts +0 -12
  270. package/dist/types/utils/jwt.d.ts.map +0 -1
  271. package/dist/types/utils/mapDecode.d.ts +0 -4
  272. package/dist/types/utils/mapDecode.d.ts.map +0 -1
  273. package/dist/types/utils/path.d.ts.map +0 -1
  274. package/dist/types/utils/querystring.d.ts.map +0 -1
  275. package/dist/types/utils/redirectUrls.d.ts.map +0 -1
  276. package/dist/types/utils/windowNavigate.d.ts.map +0 -1
@@ -39,4 +39,3 @@ export declare class AuthCookieManager {
39
39
  clearAuth(): void;
40
40
  }
41
41
  export {};
42
- //# sourceMappingURL=AuthCookieManager.d.ts.map
@@ -4,4 +4,3 @@ export type TernAUTCookie = {
4
4
  initialize: () => void;
5
5
  };
6
6
  export declare const createTernAUT: () => TernAUTCookie;
7
- //# sourceMappingURL=authTime_cookie.d.ts.map
@@ -0,0 +1 @@
1
+ export {};
@@ -1,10 +1,3 @@
1
- export { TernSecureAuth } from './instance/TernAuth';
2
- export type { TernAuth } from './instance/TernAuth';
3
- export { TernServerAuth } from './instance/TernAuthServer';
4
- export type { TernServerAuthOptions, AuthenticatedApp } from './instance/TernAuthServer';
5
- export { CoreApiClient, coreApiClient } from './instance/coreApiClient';
6
- export type { ApiResponse, ApiResponseJSON, RequestOptions, BeforeRequestHook, AfterResponseHook } from './instance/coreApiClient';
7
- export { SignIn, TernSecureBase, buildURL } from './resources/internal';
8
- export type { AuthErrorTree, TernSecureConfig, SignInFormValues, SignInProps, SignUpProps, SignInResponse, SignInForceRedirectUrl, SignUpForceRedirectUrl, SignInFallbackRedirectUrl, SignUpFallbackRedirectUrl, ResendEmailVerification, TernSecureUser, TernSecureState } from '@tern-secure/types';
9
- export { RedirectUrls } from './utils/redirectUrls';
10
- //# sourceMappingURL=index.d.ts.map
1
+ import 'regenerator-runtime/runtime';
2
+ import { TernSecureAuth } from './instance/ternsecure';
3
+ export { TernSecureAuth };
@@ -4,6 +4,7 @@ export type ApiRequestInit = RequestInit & {
4
4
  path?: string;
5
5
  search?: ConstructorParameters<typeof URLSearchParams>[0];
6
6
  sessionId?: string;
7
+ pathPrefix?: string;
7
8
  url?: URL;
8
9
  };
9
10
  export interface ApiResponseJSON<T> {
@@ -24,7 +25,7 @@ export interface ApiRequestOptions {
24
25
  recoveryTimeoutMs?: number;
25
26
  }
26
27
  export interface ApiClientOptions {
27
- domain?: string;
28
+ authDomain?: string;
28
29
  apiUrl?: string;
29
30
  frontendApi?: string;
30
31
  instanceType?: InstanceType;
@@ -55,4 +56,3 @@ export declare class HTTPError extends Error {
55
56
  constructor(status: number, url: string, body?: any | undefined);
56
57
  }
57
58
  export declare function createCoreApiClient(clientOptions: ApiClientOptions): ApiClient;
58
- //# sourceMappingURL=c_coreApiClient.d.ts.map
@@ -0,0 +1,3 @@
1
+ export declare const PRESERVED_QUERYSTRING_PARAMS: string[];
2
+ export declare const SIGN_IN_INITIAL_VALUE_KEYS: string[];
3
+ export declare const SIGN_UP_INITIAL_VALUE_KEYS: string[];
@@ -62,4 +62,3 @@ export declare class CoreApiClient {
62
62
  request<T>(init: ApiRequestInit, opts?: RequestOptions): Promise<ApiResponse<T>>;
63
63
  }
64
64
  export declare const coreApiClient: CoreApiClient;
65
- //# sourceMappingURL=coreApiClient.d.ts.map
@@ -29,4 +29,3 @@ export declare const eventBus: {
29
29
  getListeners: <Event extends keyof InternalEvents>(event: Event) => Array<(...args: any[]) => void>;
30
30
  };
31
31
  export {};
32
- //# sourceMappingURL=events.d.ts.map
@@ -0,0 +1,7 @@
1
+ import type { TernSecureAuth } from '../resources/internal';
2
+ export declare class FraudProtection {
3
+ private static instance;
4
+ private constructor();
5
+ static getInstance(): FraudProtection;
6
+ execute<T>(auth: TernSecureAuth, callback: (token?: string) => Promise<T>): Promise<T>;
7
+ }
@@ -1,9 +1,23 @@
1
- import type { CreateActiveSession, InstanceType, ListenerCallback, NavigateOptions, SessionResource, SignedInSession, SignInRedirectOptions, SignInResource, SignOut, SignUpRedirectOptions, SignUpResource, TernAuthSDK, TernSecureAuth as TernSecureAuthInterface, TernSecureAuthOptions, TernSecureUser, UnsubscribeCallback } from '@tern-secure/types';
1
+ import type { CreateActiveSession, DomainOrProxyUrl, InstanceType, ListenerCallback, NavigateOptions, SessionResource, SignedInSession, SignInProps, SignInRedirectOptions, SignInResource, SignOut, SignUpProps, SignUpRedirectOptions, SignUpResource, TernAuthSDK, TernSecureAuth as TernSecureAuthInterface, TernSecureAuthOptions, TernSecureUser, UnsubscribeCallback } from '@tern-secure/types';
2
+ import type { FirebaseApp } from 'firebase/app';
3
+ import type { AppCheck } from 'firebase/app-check';
2
4
  import type { Auth as TernAuth } from 'firebase/auth';
3
5
  import { AuthCookieManager } from '../resources/internal';
6
+ import type { MountComponentRenderer } from '../ui/Renderer';
4
7
  import { type ApiClient } from './c_coreApiClient';
5
8
  export declare function inBrowser(): boolean;
6
9
  export { TernAuth };
10
+ declare global {
11
+ interface Window {
12
+ TernSecure?: TernSecureAuth;
13
+ apiKey?: string;
14
+ apiUrl?: string;
15
+ authDomain: TernSecureAuthInterface['authDomain'];
16
+ frontEndDomain?: TernSecureAuthInterface['frontEndDomain'];
17
+ proxyUrl?: TernSecureAuthInterface['proxyUrl'];
18
+ FIREBASE_APPCHECK_DEBUG_TOKEN?: string | boolean;
19
+ }
20
+ }
7
21
  /**
8
22
  * Firebase implementation of the TernSecureAuth interface
9
23
  */
@@ -11,10 +25,12 @@ export declare class TernSecureAuth implements TernSecureAuthInterface {
11
25
  #private;
12
26
  static version: string;
13
27
  static sdkMetadata: TernAuthSDK;
28
+ static mountComponentRenderer?: MountComponentRenderer;
14
29
  private static instance;
15
30
  private _currentUser;
16
31
  private signedInSession;
17
32
  private firebaseClientApp;
33
+ private appCheckApp;
18
34
  private authStateUnsubscribe;
19
35
  private auth;
20
36
  private csrfToken;
@@ -22,6 +38,9 @@ export declare class TernSecureAuth implements TernSecureAuthInterface {
22
38
  error: Error | null;
23
39
  user: TernSecureUser | null | undefined;
24
40
  __internal_country?: string | null;
41
+ customDomain?: string | undefined;
42
+ isVisible: boolean;
43
+ currentView: 'signIn' | 'signUp' | null;
25
44
  signIn: SignInResource | null | undefined;
26
45
  signUp: SignUpResource | null | undefined;
27
46
  session: SessionResource | null | undefined;
@@ -31,23 +50,34 @@ export declare class TernSecureAuth implements TernSecureAuthInterface {
31
50
  set sdkMetadata(metadata: TernAuthSDK);
32
51
  get sdkMetadata(): TernAuthSDK;
33
52
  get requiresVerification(): boolean;
53
+ load: (options?: TernSecureAuthOptions) => Promise<void>;
54
+ __unstable__updateProps: (_props: any) => Promise<void> | undefined;
55
+ assertComponentControlsReady(controls: unknown): asserts controls is ReturnType<MountComponentRenderer>;
56
+ showSignIn(node: HTMLDivElement, props?: SignInProps): void;
57
+ hideSignIn(node: HTMLDivElement): void;
58
+ showSignUp(node: HTMLDivElement, props?: SignUpProps): void;
59
+ hideSignUp(node: HTMLDivElement): void;
60
+ showUserButton(node: HTMLDivElement): void;
61
+ hideUserButton(node: HTMLDivElement): void;
34
62
  get apiUrl(): string;
35
- get domain(): string;
63
+ get authDomain(): string;
36
64
  get instanceType(): InstanceType | undefined;
37
- constructor(options?: TernSecureAuthOptions);
65
+ constructor(apiUrl: string, options?: DomainOrProxyUrl);
38
66
  getApiClient: () => ApiClient;
39
67
  setLoading(isLoading: boolean): void;
40
68
  authCookieManager(): AuthCookieManager | undefined;
41
69
  _internal_getOption<K extends keyof TernSecureAuthOptions>(key: K): TernSecureAuthOptions[K];
42
70
  _internal_getAllOptions(): Readonly<TernSecureAuthOptions>;
43
- static getOrCreateInstance(options?: TernSecureAuthOptions): TernSecureAuth;
71
+ static getOrCreateInstance(apiUrl: string, options?: DomainOrProxyUrl): TernSecureAuth;
44
72
  static clearInstance(): void;
45
- static initialize(options: TernSecureAuthOptions): TernSecureAuth;
73
+ static initialize(options?: TernSecureAuthOptions): TernSecureAuth;
46
74
  initialize: (options?: TernSecureAuthOptions) => Promise<void>;
47
- static create(options: TernSecureAuthOptions): TernSecureAuth;
75
+ static create(options?: TernSecureAuthOptions): TernSecureAuth;
48
76
  private initializeFirebaseApp;
49
77
  signOut: SignOut;
50
78
  get currentSession(): SignedInSession | null;
79
+ get firebaseApp(): FirebaseApp | undefined;
80
+ get appCheck(): AppCheck | undefined;
51
81
  private initAuthListener;
52
82
  private initAuthStateListener;
53
83
  private _onIdTokenChanged;
@@ -63,6 +93,7 @@ export declare class TernSecureAuth implements TernSecureAuthInterface {
63
93
  createActiveSession: CreateActiveSession;
64
94
  navigate: (to: string | undefined, options?: NavigateOptions) => Promise<unknown>;
65
95
  constructUrlWithAuthRedirect: (to: string) => string;
96
+ constructAfterSignOutUrl: () => string;
66
97
  redirectToSignIn: (options?: SignInRedirectOptions) => Promise<unknown>;
67
98
  redirectToSignUp: (options?: SignUpRedirectOptions) => Promise<unknown>;
68
99
  redirectAfterSignIn: () => Promise<unknown>;
@@ -71,4 +102,3 @@ export declare class TernSecureAuth implements TernSecureAuthInterface {
71
102
  constructSignUpUrl: (options?: SignUpRedirectOptions) => string;
72
103
  __internal_setCountry: (country: string | null) => void;
73
104
  }
74
- //# sourceMappingURL=TernAuth.d.ts.map
@@ -0,0 +1,2 @@
1
+ import { type ClassValue } from "clsx";
2
+ export declare function cn(...inputs: ClassValue[]): string;
@@ -1,3 +1,4 @@
1
+ import type { TernSecureResourceJSON } from '@tern-secure/types';
1
2
  import type { ApiRequestInit, ApiResponseJSON } from '../instance/coreApiClient';
2
3
  import type { AuthCookieManager, TernSecureAuth } from './internal';
3
4
  export type HTTPMethod = 'CONNECT' | 'DELETE' | 'GET' | 'HEAD' | 'OPTIONS' | 'PATCH' | 'POST' | 'PUT' | 'TRACE';
@@ -8,16 +9,28 @@ export type PostMutateParams = {
8
9
  path?: string;
9
10
  search?: ConstructorParameters<typeof URLSearchParams>[0];
10
11
  };
12
+ export type BaseMutateParams = {
13
+ action?: string;
14
+ body?: any;
15
+ method?: HTTPMethod;
16
+ path?: string;
17
+ };
11
18
  export declare abstract class TernSecureBase {
12
19
  static ternsecure: TernSecureAuth;
20
+ id?: string;
21
+ pathRoot: string;
13
22
  static get apiClient(): import("../instance/c_coreApiClient").ApiClient;
14
23
  static get authCookieManager(): AuthCookieManager | undefined;
15
24
  protected get authCookieManager(): AuthCookieManager | undefined;
25
+ isNew(): boolean;
26
+ static _fetch<J extends TernSecureResourceJSON | null>(requestInit: ApiRequestInit): Promise<ApiResponseJSON<J> | null>;
16
27
  /**
17
28
  * Core method to fetch data from API endpoints using coreApiClient
18
29
  * This method handles the complete request lifecycle including error handling
19
30
  */
20
- protected static fetchFromCoreApi<J>(requestInit: ApiRequestInit): Promise<ApiResponseJSON<J> | null>;
31
+ protected static _baseFetch<J extends TernSecureResourceJSON | null>(requestInit: ApiRequestInit): Promise<ApiResponseJSON<J> | null>;
32
+ protected path(action?: string): string;
33
+ protected abstract fromJSON(data: TernSecureResourceJSON | null): this;
21
34
  /**
22
35
  * Convenience method for making POST requests
23
36
  */
@@ -25,11 +38,12 @@ export declare abstract class TernSecureBase {
25
38
  /**
26
39
  * Instance method to fetch data from API endpoints
27
40
  */
28
- protected fetchFromCoreApi(requestInit: ApiRequestInit): Promise<ApiResponseJSON<any> | null>;
41
+ protected _fetch<J extends TernSecureResourceJSON>(requestInit: ApiRequestInit): Promise<ApiResponseJSON<any> | null>;
29
42
  /**
30
43
  * Instance method for making POST requests
31
44
  */
32
45
  protected basePost(params: PostMutateParams): Promise<ApiResponseJSON<any> | null>;
46
+ protected _baseMutate<J extends TernSecureResourceJSON>(params?: BaseMutateParams): Promise<this>;
33
47
  /**
34
48
  * Instance method to make GET requests
35
49
  * This is a convenience method that sets the HTTP method to GET
@@ -40,8 +54,8 @@ export declare abstract class TernSecureBase {
40
54
  * This is designed to be used by child classes like SignIn
41
55
  */
42
56
  protected _post(params: PostMutateParams): Promise<ApiResponseJSON<any> | null>;
57
+ protected _basePost<J extends TernSecureResourceJSON>(params?: BaseMutateParams): Promise<this>;
43
58
  static makeApiRequest(requestInit: ApiRequestInit): Promise<ApiResponseJSON<any> | null>;
44
59
  protected makeApiRequest(requestInit: ApiRequestInit): Promise<ApiResponseJSON<any> | null>;
45
60
  private static shouldRethrowofflineNetworkError;
46
61
  }
47
- //# sourceMappingURL=Base.d.ts.map
@@ -1,2 +1 @@
1
1
  export { TernSecureAPIResponseError, TernSecureRuntimeError, } from "@tern-secure/shared/errors-api";
2
- //# sourceMappingURL=Error.d.ts.map
@@ -1,4 +1,4 @@
1
- import type { IdTokenResult, SessionJson, SessionResource, SessionStatus, TernSecureUser } from '@tern-secure/types';
1
+ import type { IdTokenResult, SessionJson, SessionResource, SessionStatus, TernSecureResourceJSON, TernSecureUser } from '@tern-secure/types';
2
2
  import { TernSecureBase } from './Base';
3
3
  /**
4
4
  * Enhanced Session class that handles custom token authentication for client-server sync.
@@ -45,5 +45,5 @@ export declare class Session extends TernSecureBase implements SessionResource {
45
45
  * Convert session to plain object for serialization
46
46
  */
47
47
  toJSON(): SessionJson;
48
+ protected fromJSON(data: SessionJson | TernSecureResourceJSON | null): this;
48
49
  }
49
- //# sourceMappingURL=Session.d.ts.map
@@ -1,5 +1,5 @@
1
- import type { ResendEmailVerification, SignInFormValues, SignInResource, SignInResponse as SignInResponseFromTypes, SignInStatus, SocialProviderOptions } from '@tern-secure/types';
2
- import type { Auth, UserCredential } from 'firebase/auth';
1
+ import type { AttemptFirstFactorParams, SignInCreateParams, SignInFirstFactor, SignInJson, SignInPasswordParams, SignInPhoneParams, SignInResource, SignInResponse as SignInResponseFromTypes, SignInStatus, SignInVerificationResponse, SocialProviderOptions, TernSecureUser } from '@tern-secure/types';
2
+ import type { ApplicationVerifier, Auth, UserCredential } from 'firebase/auth';
3
3
  import { TernSecureBase } from './Base';
4
4
  type SignInResponse = SignInResponseFromTypes;
5
5
  export type TernRequestInit = RequestInit;
@@ -13,18 +13,35 @@ export type SignInParams = {
13
13
  export type SupportedProvider = 'google' | 'apple' | 'microsoft' | 'github' | 'twitter' | 'facebook' | string;
14
14
  export declare class SignIn extends TernSecureBase implements SignInResource {
15
15
  pathRoot: string;
16
+ pathSessionRoot: string;
17
+ id?: string;
16
18
  status: SignInStatus | null;
19
+ supportedFirstFactors: SignInFirstFactor[] | null;
20
+ identifier: string | null;
17
21
  private auth;
18
22
  private csrfToken;
19
23
  private _currentUser;
20
- constructor(auth: Auth, csrfToken: string | undefined);
21
- signInWithCredential: (credential: UserCredential) => Promise<import("..").ApiResponseJSON<any> | null>;
22
- withEmailAndPassword: (params: SignInFormValues) => Promise<SignInResponse>;
23
- withCredential: (params: SignInFormValues) => Promise<void>;
24
- withSocialProvider: (provider: SupportedProvider, options?: SocialProviderOptions) => Promise<SignInResponse>;
24
+ private _confirmationResult;
25
+ constructor(data: (SignInJson | null) | undefined, auth: Auth, csrfToken: string | undefined);
26
+ get user(): TernSecureUser | null;
27
+ create: (params: SignInCreateParams) => Promise<this>;
28
+ attemptFirstFactor: (params: AttemptFirstFactorParams) => Promise<SignInResource>;
29
+ attemptPhoneNumberVerification: (params: {
30
+ code: string;
31
+ }) => Promise<SignInResponse>;
32
+ signInWithCredential: (credential: UserCredential) => Promise<import("../instance/coreApiClient").ApiResponseJSON<any> | null>;
33
+ authenticateWithPassword: (params: SignInPasswordParams) => Promise<SignInResponse>;
34
+ createRecaptchaVerifier: (containerOrId: string | HTMLElement, parameters?: any) => ApplicationVerifier;
35
+ authenticateWithPhoneNumber: (params: SignInPhoneParams) => Promise<SignInResponse>;
36
+ withCredential: (params: SignInPasswordParams) => Promise<void>;
37
+ authenticateWithSocialProvider: (provider: SupportedProvider, options?: SocialProviderOptions) => Promise<SignInResponse>;
25
38
  completeMfaSignIn: (_mfaToken: string, _mfaContext?: any) => Promise<SignInResponse>;
26
- sendPasswordResetEmail: (email: string) => Promise<void>;
27
- resendEmailVerification: () => Promise<ResendEmailVerification>;
39
+ sendPasswordResetEmail: (email: string) => Promise<import("../instance/coreApiClient").ApiResponseJSON<any> | null>;
40
+ private resendEmailVerification;
41
+ attemptEmailVerification: (options?: {
42
+ url?: string;
43
+ handleCodeInApp?: boolean;
44
+ }) => Promise<SignInVerificationResponse>;
28
45
  private getProviderConfig;
29
46
  private authRedirectResult;
30
47
  /**
@@ -50,6 +67,6 @@ export declare class SignIn extends TernSecureBase implements SignInResource {
50
67
  private _signInWithRedirect;
51
68
  private _signInWithPopUp;
52
69
  checkRedirectResult(): Promise<SignInResponse | null>;
70
+ protected fromJSON(data: SignInJson | null): this;
53
71
  }
54
72
  export {};
55
- //# sourceMappingURL=SignIn.d.ts.map
@@ -1,17 +1,19 @@
1
- import type { SignUpInitialValue, SignUpResource, SignUpResponse, SignUpStatus } from '@tern-secure/types';
1
+ import type { SignUpFormValues, SignUpJson, SignUpResource, SignUpStatus, TernSecureUser, UnverifiedField } from '@tern-secure/types';
2
2
  import type { Auth } from 'firebase/auth';
3
3
  import { TernSecureBase } from './Base';
4
4
  export declare class SignUp extends TernSecureBase implements SignUpResource {
5
5
  status: SignUpStatus | null;
6
- username: string | null;
7
- firstName: string | null;
8
- lastName: string | null;
9
- displayName: string | null;
10
- email: string | null;
11
- phoneNumber: string | null;
6
+ user: TernSecureUser | null;
7
+ unverifiedFields?: UnverifiedField[];
8
+ message?: string;
9
+ error?: any;
12
10
  private auth;
13
- constructor(auth: Auth);
14
- withEmailAndPassword: (params: SignUpInitialValue) => Promise<SignUpResponse>;
11
+ constructor(data: (SignUpJson | null) | undefined, auth: Auth);
12
+ withEmailAndPassword: (params: SignUpFormValues) => Promise<SignUpResource>;
15
13
  withSocialProvider(): Promise<void>;
14
+ attemptEmailVerification: (options?: {
15
+ url?: string;
16
+ handleCodeInApp?: boolean;
17
+ }) => Promise<SignUpResource>;
18
+ protected fromJSON(data: SignUpJson | null): this;
16
19
  }
17
- //# sourceMappingURL=SignUp.d.ts.map
@@ -1,4 +1,4 @@
1
- export type { TernSecureAuth } from '../instance/TernAuth';
1
+ export type { TernSecureAuth } from '../instance/ternsecure';
2
2
  export * from './Session';
3
3
  export * from './SignUp';
4
4
  export * from './SignIn';
@@ -6,4 +6,3 @@ export * from './Base';
6
6
  export * from '../auth/AuthCookieManager';
7
7
  export * from '../utils';
8
8
  export * from './Error';
9
- //# sourceMappingURL=internal.d.ts.map
@@ -0,0 +1,26 @@
1
+ import type { TernSecureAuth, TernSecureAuthOptions } from '@tern-secure/types';
2
+ import type { TernSecureComponentName } from './lazyLoading/components';
3
+ import type { AvailableComponentProps } from './types';
4
+ export type TernComponentControls = {
5
+ mountComponent: (params: {
6
+ appearanceKey: string;
7
+ name: TernSecureComponentName;
8
+ node: HTMLDivElement;
9
+ props?: AvailableComponentProps;
10
+ }) => void;
11
+ unmountComponent: (params: {
12
+ node: HTMLDivElement;
13
+ }) => void;
14
+ updateProps: (params: {
15
+ appearanceKey?: string;
16
+ options?: TernSecureAuthOptions | undefined;
17
+ node: HTMLDivElement;
18
+ props?: unknown;
19
+ }) => void;
20
+ };
21
+ export declare const mountComponentRenderer: (ternsecure: TernSecureAuth, options: TernSecureAuthOptions) => {
22
+ ensureMounted: (opts?: {
23
+ preloadHint: TernSecureComponentName;
24
+ }) => Promise<TernComponentControls>;
25
+ };
26
+ export type MountComponentRenderer = typeof mountComponentRenderer;
@@ -0,0 +1,6 @@
1
+ type ProviderInitialIconProps = {
2
+ id: string;
3
+ className?: string;
4
+ };
5
+ export declare const ProviderInitialIcon: ({ id, className }: ProviderInitialIconProps) => import("react/jsx-runtime").JSX.Element | null;
6
+ export {};
@@ -0,0 +1,12 @@
1
+ import type { PropsWithChildren } from 'react';
2
+ import React from 'react';
3
+ export type VerificationCodeCardProps = {
4
+ cardTitle?: string;
5
+ cardDescription?: string;
6
+ inputLabel?: string;
7
+ submitButtonText?: string;
8
+ onCodeEntryFinishedAction: (code: string, resolve: () => Promise<void>, reject: (err: unknown) => Promise<void>) => void;
9
+ onResendCodeClicked?: React.MouseEventHandler;
10
+ onBackLinkClicked?: React.MouseEventHandler;
11
+ };
12
+ export declare const VerificationCodeCard: (props: PropsWithChildren<VerificationCodeCardProps>) => import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,7 @@
1
+ type VerificationLinkCardProps = {
2
+ emailSent?: boolean;
3
+ onResend?: () => Promise<void>;
4
+ isLoading?: boolean;
5
+ };
6
+ export declare const VerificationLinkCard: (props: VerificationLinkCardProps) => import("react/jsx-runtime").JSX.Element;
7
+ export {};
@@ -0,0 +1,8 @@
1
+ import type { Attribute } from '@tern-secure/types';
2
+ export type SignInStartIdentifier = 'email_address' | 'phone_number';
3
+ export declare const groupIdentifiers: (attributes: Attribute[]) => SignInStartIdentifier[];
4
+ export declare const getIdentifiers: (identifier: SignInStartIdentifier) => {
5
+ fieldName: string;
6
+ label: string;
7
+ placeholder: string;
8
+ };
@@ -0,0 +1,3 @@
1
+ export type { SignInStartIdentifier, } from './constants';
2
+ export { getIdentifiers, groupIdentifiers, } from './constants';
3
+ export { ProviderInitialIcon } from './ProviderInitialIcon';
@@ -0,0 +1 @@
1
+ export declare const PasswordReset: () => import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1 @@
1
+ export declare function PasswordResetSuccess(): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,4 @@
1
+ import type { SignInModalProps, SignInProps } from '@tern-secure/types';
2
+ import React from 'react';
3
+ export declare const SignIn: React.ComponentType<SignInProps>;
4
+ export declare const SignInModal: (props: SignInModalProps) => React.JSX.Element;
@@ -0,0 +1,2 @@
1
+ import React from 'react';
2
+ export declare function SignInEmailLinkCard(): React.JSX.Element;
@@ -0,0 +1 @@
1
+ export declare const SignInFactorOne: (props: unknown) => import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,7 @@
1
+ import type { EmailCodeFactor, PhoneCodeFactor } from '@tern-secure/types';
2
+ import type { VerificationCodeCardProps } from '../../common/VerificationCodeCard';
3
+ export type SignInFactorOneCodeCard = Pick<VerificationCodeCardProps, 'onBackLinkClicked'> & {
4
+ factor: EmailCodeFactor | PhoneCodeFactor;
5
+ };
6
+ export type SignInFactorOneCodeFormProps = SignInFactorOneCodeCard;
7
+ export declare const SignInFactorOneCodeForm: (props: SignInFactorOneCodeFormProps) => import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,6 @@
1
+ type SignInFactorOnePasswordProps = {
2
+ signInWithPassword: (password: string) => Promise<void>;
3
+ onForgotPassword?: () => void;
4
+ };
5
+ export declare const SignInFactorOnePasswordCard: (props: SignInFactorOnePasswordProps) => import("react/jsx-runtime").JSX.Element;
6
+ export {};
@@ -0,0 +1,7 @@
1
+ import type { PhoneCodeFactor } from '@tern-secure/types';
2
+ import type { SignInFactorOneCodeCard } from './SignInFactorOneCodeForm';
3
+ type SignInFactorOnePhoneCodeCardProps = SignInFactorOneCodeCard & {
4
+ factor: PhoneCodeFactor;
5
+ };
6
+ export declare const SignInFactorOnePhoneCodeCard: (props: SignInFactorOnePhoneCodeCardProps) => import("react/jsx-runtime").JSX.Element;
7
+ export {};
@@ -0,0 +1,8 @@
1
+ interface SignInPasswordProps {
2
+ onError?: (error: Error) => void;
3
+ isDisabled?: boolean;
4
+ signInWithPassword?: (email: string, password: string) => Promise<void>;
5
+ onForgotPassword?: () => void;
6
+ }
7
+ export declare const SignInPassword: (props: SignInPasswordProps) => import("react/jsx-runtime").JSX.Element;
8
+ export {};
@@ -0,0 +1 @@
1
+ export declare const SignInSocialButtons: () => import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,7 @@
1
+ export type SessionErrorCode = 'ENDPOINT_NOT_FOUND' | 'COOKIE_SET_FAILED' | 'API_REQUEST_FAILED' | 'NETWORK_ERROR' | 'UNAUTHORIZED' | 'UNKNOWN_ERROR';
2
+ export interface SessionError {
3
+ code: SessionErrorCode;
4
+ message: string;
5
+ original?: unknown;
6
+ }
7
+ export declare const SignInStart: (props: unknown) => import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1 @@
1
+ export declare const SignInVerifyEmail: (props: unknown) => import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,4 @@
1
+ import '../../../index.css';
2
+ export * from './SignIn';
3
+ export * from './ResetPassword';
4
+ export * from './ResetPasswordSuccess';
@@ -0,0 +1,8 @@
1
+ import type { SignUpModalProps } from '@tern-secure/types';
2
+ import React from 'react';
3
+ import type { SignUpProps } from '../../types';
4
+ import { SignUpStart } from './SignUpStart';
5
+ import { SignUpVerifyEmail } from './SignUpVerifyEmail';
6
+ export declare const SignUp: React.ComponentType<SignUpProps>;
7
+ export declare const SignUpModal: (props: SignUpModalProps) => React.JSX.Element;
8
+ export { SignUpStart, SignUpVerifyEmail };
@@ -0,0 +1,2 @@
1
+ import React from 'react';
2
+ export declare function SignUpEmailLinkCard(): React.JSX.Element;
@@ -0,0 +1 @@
1
+ export declare const SignUpSocialButtons: () => import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1 @@
1
+ export declare const SignUpStart: (props: unknown) => import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1 @@
1
+ export declare const SignUpVerifyEmail: (props: unknown) => import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,2 @@
1
+ import '../../../index.css';
2
+ export * from './SignUp';
@@ -0,0 +1,14 @@
1
+ import type { SignUpResource } from '@tern-secure/types';
2
+ type CompleteSignUpFlowProps = {
3
+ signUp: SignUpResource;
4
+ verifyEmailPath?: string;
5
+ verifyPhonePath?: string;
6
+ continuePath?: string;
7
+ navigate: (to: string) => Promise<unknown>;
8
+ handleComplete?: () => Promise<void>;
9
+ redirectUrl?: string;
10
+ redirectUrlComplete?: string;
11
+ oidcPrompt?: string;
12
+ };
13
+ export declare const completeSignUpFlow: ({ signUp, verifyEmailPath, navigate, handleComplete }: CompleteSignUpFlowProps) => Promise<unknown> | undefined;
14
+ export {};
@@ -0,0 +1 @@
1
+ export * from './userButton';
@@ -0,0 +1 @@
1
+ export declare function UserButton(): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,4 @@
1
+ import type { SignInResource, SignUpResource, TernSecureUser } from '@tern-secure/types';
2
+ export declare function useAuthSignIn(): SignInResource | undefined | null;
3
+ export declare function useAuthSignUp(): SignUpResource | undefined | null;
4
+ export declare function useAuthUser(): TernSecureUser | null;
@@ -0,0 +1,8 @@
1
+ import type { ReactNode } from 'react';
2
+ import type { AvailableComponentName, AvailableComponentProps } from '../types';
3
+ export declare function TernAuthUIComponentProvider({ componentName, props, children, }: {
4
+ componentName: AvailableComponentName;
5
+ props: AvailableComponentProps;
6
+ children: ReactNode;
7
+ }): import("react/jsx-runtime").JSX.Element;
8
+ export * from './components';
@@ -0,0 +1,8 @@
1
+ import type { TernSecureAuth } from '@tern-secure/types';
2
+ import React from 'react';
3
+ type TernSecureContextWrapperProps = {
4
+ ternsecure: TernSecureAuth;
5
+ children: React.ReactNode;
6
+ };
7
+ export declare function TernSecureContextWrapper(props: TernSecureContextWrapperProps): React.JSX.Element | null;
8
+ export {};
@@ -0,0 +1,10 @@
1
+ import type { TernSecureAuthOptions } from '@tern-secure/types';
2
+ import React from 'react';
3
+ export declare const TernSecureAuthOptionsCtx: React.Context<TernSecureAuthOptions>;
4
+ interface OptionsProviderProps {
5
+ children: React.ReactNode;
6
+ value: TernSecureAuthOptions;
7
+ }
8
+ declare function TernSecureOptionsProvider({ children, value }: OptionsProviderProps): import("react/jsx-runtime").JSX.Element;
9
+ declare function useTernSecureOptions(): TernSecureAuthOptions;
10
+ export { useTernSecureOptions, TernSecureOptionsProvider };
@@ -0,0 +1,21 @@
1
+ import type { AuthErrorTree, TernSecureUser } from '@tern-secure/types';
2
+ import type { ParsedQueryString } from '../../router';
3
+ import type { SignInCtx } from '../../types';
4
+ export type SignInContextType = Omit<SignInCtx, 'fallbackRedirectUrl' | 'forceRedirectUrl'> & {
5
+ onSignInSuccess: (user: TernSecureUser, options?: {
6
+ onPreRedirect?: () => Promise<boolean>;
7
+ }) => void;
8
+ handleSignInError: (error: AuthErrorTree) => void;
9
+ redirectAfterSignIn: () => any;
10
+ queryParams: ParsedQueryString;
11
+ signInUrl: string;
12
+ signUpUrl: string;
13
+ authQueryString: string | null;
14
+ afterSignUpUrl: string;
15
+ afterSignInUrl: string;
16
+ checkRedirectResult: () => Promise<void>;
17
+ isCombinedFlow: boolean;
18
+ showCombinedForm: boolean;
19
+ };
20
+ export declare const SignInContext: import("react").Context<SignInCtx | null>;
21
+ export declare const useSignInContext: () => SignInContextType;