@passflow/core 0.20.0 → 0.20.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.
Files changed (128) hide show
  1. package/dist/index.cjs +1 -1
  2. package/dist/index.cjs.map +1 -1
  3. package/dist/index.d.cts +5944 -0
  4. package/dist/index.d.ts +5944 -0
  5. package/dist/index.mjs +1 -1
  6. package/dist/index.mjs.map +1 -1
  7. package/package.json +15 -7
  8. package/dist/lib/api/app.d.ts +0 -11
  9. package/dist/lib/api/app.d.ts.map +0 -1
  10. package/dist/lib/api/auth.d.ts +0 -42
  11. package/dist/lib/api/auth.d.ts.map +0 -1
  12. package/dist/lib/api/axios-client.d.ts +0 -109
  13. package/dist/lib/api/axios-client.d.ts.map +0 -1
  14. package/dist/lib/api/cli-auth.d.ts +0 -12
  15. package/dist/lib/api/cli-auth.d.ts.map +0 -1
  16. package/dist/lib/api/index.d.ts +0 -11
  17. package/dist/lib/api/index.d.ts.map +0 -1
  18. package/dist/lib/api/invitation.d.ts +0 -80
  19. package/dist/lib/api/invitation.d.ts.map +0 -1
  20. package/dist/lib/api/model.d.ts +0 -844
  21. package/dist/lib/api/model.d.ts.map +0 -1
  22. package/dist/lib/api/setting.d.ts +0 -13
  23. package/dist/lib/api/setting.d.ts.map +0 -1
  24. package/dist/lib/api/tenant.d.ts +0 -216
  25. package/dist/lib/api/tenant.d.ts.map +0 -1
  26. package/dist/lib/api/two-factor.d.ts +0 -137
  27. package/dist/lib/api/two-factor.d.ts.map +0 -1
  28. package/dist/lib/api/upgrade.d.ts +0 -39
  29. package/dist/lib/api/upgrade.d.ts.map +0 -1
  30. package/dist/lib/api/user.d.ts +0 -22
  31. package/dist/lib/api/user.d.ts.map +0 -1
  32. package/dist/lib/constants/index.d.ts +0 -33
  33. package/dist/lib/constants/index.d.ts.map +0 -1
  34. package/dist/lib/device/index.d.ts +0 -17
  35. package/dist/lib/device/index.d.ts.map +0 -1
  36. package/dist/lib/index.d.ts +0 -22
  37. package/dist/lib/index.d.ts.map +0 -1
  38. package/dist/lib/interceptors/fetch-registry.d.ts +0 -96
  39. package/dist/lib/interceptors/fetch-registry.d.ts.map +0 -1
  40. package/dist/lib/m2m/client.d.ts +0 -196
  41. package/dist/lib/m2m/client.d.ts.map +0 -1
  42. package/dist/lib/m2m/errors.d.ts +0 -107
  43. package/dist/lib/m2m/errors.d.ts.map +0 -1
  44. package/dist/lib/m2m/index.d.ts +0 -27
  45. package/dist/lib/m2m/index.d.ts.map +0 -1
  46. package/dist/lib/m2m/types.d.ts +0 -217
  47. package/dist/lib/m2m/types.d.ts.map +0 -1
  48. package/dist/lib/passflow.d.ts +0 -1224
  49. package/dist/lib/passflow.d.ts.map +0 -1
  50. package/dist/lib/pkce.d.ts +0 -13
  51. package/dist/lib/pkce.d.ts.map +0 -1
  52. package/dist/lib/platform/index.d.ts +0 -4
  53. package/dist/lib/platform/index.d.ts.map +0 -1
  54. package/dist/lib/platform/types.d.ts +0 -206
  55. package/dist/lib/platform/types.d.ts.map +0 -1
  56. package/dist/lib/platform/web-adapter.d.ts +0 -104
  57. package/dist/lib/platform/web-adapter.d.ts.map +0 -1
  58. package/dist/lib/services/auth-service.d.ts +0 -197
  59. package/dist/lib/services/auth-service.d.ts.map +0 -1
  60. package/dist/lib/services/index.d.ts +0 -8
  61. package/dist/lib/services/index.d.ts.map +0 -1
  62. package/dist/lib/services/invitation-service.d.ts +0 -44
  63. package/dist/lib/services/invitation-service.d.ts.map +0 -1
  64. package/dist/lib/services/logger.d.ts +0 -24
  65. package/dist/lib/services/logger.d.ts.map +0 -1
  66. package/dist/lib/services/tenant-service.d.ts +0 -200
  67. package/dist/lib/services/tenant-service.d.ts.map +0 -1
  68. package/dist/lib/services/tenant-user-membership.d.ts +0 -76
  69. package/dist/lib/services/tenant-user-membership.d.ts.map +0 -1
  70. package/dist/lib/services/token-cache-service.d.ts +0 -36
  71. package/dist/lib/services/token-cache-service.d.ts.map +0 -1
  72. package/dist/lib/services/two-factor-service.d.ts +0 -193
  73. package/dist/lib/services/two-factor-service.d.ts.map +0 -1
  74. package/dist/lib/services/user-service.d.ts +0 -41
  75. package/dist/lib/services/user-service.d.ts.map +0 -1
  76. package/dist/lib/storage/index.d.ts +0 -106
  77. package/dist/lib/storage/index.d.ts.map +0 -1
  78. package/dist/lib/store.d.ts +0 -175
  79. package/dist/lib/store.d.ts.map +0 -1
  80. package/dist/lib/token/delivery-manager.d.ts +0 -121
  81. package/dist/lib/token/delivery-manager.d.ts.map +0 -1
  82. package/dist/lib/token/index.d.ts +0 -4
  83. package/dist/lib/token/index.d.ts.map +0 -1
  84. package/dist/lib/token/membership.d.ts +0 -37
  85. package/dist/lib/token/membership.d.ts.map +0 -1
  86. package/dist/lib/token/service.d.ts +0 -47
  87. package/dist/lib/token/service.d.ts.map +0 -1
  88. package/dist/lib/token/token.d.ts +0 -55
  89. package/dist/lib/token/token.d.ts.map +0 -1
  90. package/dist/lib/types/index.d.ts +0 -24
  91. package/dist/lib/types/index.d.ts.map +0 -1
  92. package/dist/lib/upgrade/acr.d.ts +0 -85
  93. package/dist/lib/upgrade/acr.d.ts.map +0 -1
  94. package/dist/lib/upgrade/axios-adapter.d.ts +0 -81
  95. package/dist/lib/upgrade/axios-adapter.d.ts.map +0 -1
  96. package/dist/lib/upgrade/challenge.d.ts +0 -217
  97. package/dist/lib/upgrade/challenge.d.ts.map +0 -1
  98. package/dist/lib/upgrade/client.d.ts +0 -29
  99. package/dist/lib/upgrade/client.d.ts.map +0 -1
  100. package/dist/lib/upgrade/controller.d.ts +0 -435
  101. package/dist/lib/upgrade/controller.d.ts.map +0 -1
  102. package/dist/lib/upgrade/core.d.ts +0 -353
  103. package/dist/lib/upgrade/core.d.ts.map +0 -1
  104. package/dist/lib/upgrade/errors.d.ts +0 -208
  105. package/dist/lib/upgrade/errors.d.ts.map +0 -1
  106. package/dist/lib/upgrade/facade.d.ts +0 -188
  107. package/dist/lib/upgrade/facade.d.ts.map +0 -1
  108. package/dist/lib/upgrade/factors.d.ts +0 -97
  109. package/dist/lib/upgrade/factors.d.ts.map +0 -1
  110. package/dist/lib/upgrade/fetch-adapter.d.ts +0 -30
  111. package/dist/lib/upgrade/fetch-adapter.d.ts.map +0 -1
  112. package/dist/lib/upgrade/index.d.ts +0 -17
  113. package/dist/lib/upgrade/index.d.ts.map +0 -1
  114. package/dist/lib/upgrade/markers.d.ts +0 -64
  115. package/dist/lib/upgrade/markers.d.ts.map +0 -1
  116. package/dist/lib/upgrade/replay.d.ts +0 -132
  117. package/dist/lib/upgrade/replay.d.ts.map +0 -1
  118. package/dist/lib/upgrade/select.d.ts +0 -48
  119. package/dist/lib/upgrade/select.d.ts.map +0 -1
  120. package/dist/lib/upgrade/session.d.ts +0 -72
  121. package/dist/lib/upgrade/session.d.ts.map +0 -1
  122. package/dist/lib/upgrade/snapshot.d.ts +0 -196
  123. package/dist/lib/upgrade/snapshot.d.ts.map +0 -1
  124. package/dist/lib/upgrade/transport.d.ts +0 -69
  125. package/dist/lib/upgrade/transport.d.ts.map +0 -1
  126. package/dist/lib/utils/validation.d.ts +0 -54
  127. package/dist/lib/utils/validation.d.ts.map +0 -1
  128. package/dist/tsconfig.build.tsbuildinfo +0 -1
@@ -1 +0,0 @@
1
- {"version":3,"file":"passflow.d.ts","sourceRoot":"","sources":["../../lib/passflow.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,OAAO,CAAC;AAC3C,OAAO,EAEL,KAAK,WAAW,EAGhB,KAAK,wBAAwB,EAC7B,KAAK,kBAAkB,EACvB,KAAK,6BAA6B,EAClC,KAAK,cAAc,EAEnB,4BAA4B,EAC5B,KAAK,uCAAuC,EAC5C,KAAK,mCAAmC,EACxC,KAAK,uBAAuB,EAC5B,KAAK,4BAA4B,EACjC,KAAK,yCAAyC,EAC9C,KAAK,iCAAiC,EACtC,KAAK,8BAA8B,EACnC,KAAK,qCAAqC,EAC1C,KAAK,mBAAmB,EACxB,KAAK,qBAAq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E;IAED;;;;;;;;;;;;;;OAcG;IACH,mBAAmB,IAAI,OAAO,aAAa,EAAE,8BAA8B,GAAG,IAAI,CAEjF;IAED;;;;;;;;;;;;;OAaG;IACH,mBAAmB,IAAI,OAAO,CAE7B;IAED;;;;;;;;;;OAUG;IACH,qBAAqB,IAAI,IAAI,CAE5B;CACF"}
@@ -1,13 +0,0 @@
1
- /**
2
- * RFC 7636 proof key: the verifier stays on this client, its S256 hash goes to
3
- * the server with the sign-in, and the server answers with a code that only the
4
- * verifier redeems.
5
- */
6
- export type PkcePair = {
7
- verifier: string;
8
- challenge: string;
9
- };
10
- /** BASE64URL(SHA256(ASCII(verifier))), RFC 7636 §4.2. */
11
- export declare const s256Challenge: (verifier: string) => Promise<string>;
12
- export declare const createPkcePair: () => Promise<PkcePair>;
13
- //# sourceMappingURL=pkce.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"pkce.d.ts","sourceRoot":"","sources":["../../lib/pkce.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,MAAM,MAAM,QAAQ,GAAG;IACrB,QAAQ,EAAE,MAAM,CAAC;IACjB,SAAS,EAAE,MAAM,CAAC;CACnB,CAAC;AA+BF,yDAAyD;AACzD,eAAO,MAAM,aAAa,aAAoB,MAAM,KAAG,OAAO,CAAC,MAAM,CAGpE,CAAC;AAEF,eAAO,MAAM,cAAc,QAAa,OAAO,CAAC,QAAQ,CAGvD,CAAC"}
@@ -1,4 +0,0 @@
1
- export type { AuthCallbackResult, CurrentUrlInfo, OpenAuthUrlOptions, PasskeySupport, PlatformAdapter, PlatformStorage, } from './types';
2
- export { PopupClosedError } from './types';
3
- export { WebAdapter, webAdapter } from './web-adapter';
4
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../lib/platform/index.ts"],"names":[],"mappings":"AAAA,YAAY,EACV,kBAAkB,EAClB,cAAc,EACd,kBAAkB,EAClB,cAAc,EACd,eAAe,EACf,eAAe,GAChB,MAAM,SAAS,CAAC;AACjB,OAAO,EAAE,gBAAgB,EAAE,MAAM,SAAS,CAAC;AAC3C,OAAO,EAAE,UAAU,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC"}
@@ -1,206 +0,0 @@
1
- import type { AuthenticationResponseJSON, PublicKeyCredentialCreationOptionsJSON, PublicKeyCredentialRequestOptionsJSON, RegistrationResponseJSON } from '@simplewebauthn/browser';
2
- import type { Storage } from '../storage';
3
- /**
4
- * Synchronous key-value storage interface.
5
- * Compatible with localStorage (web) and react-native-mmkv (RN).
6
- * Alias of the Storage type in lib/storage/index.ts to maintain a single source of truth.
7
- */
8
- export type PlatformStorage = Storage;
9
- /**
10
- * Result returned by getCurrentUrl().
11
- * Provides structured access to URL components so adapters don't
12
- * need to parse a URL string themselves.
13
- */
14
- export type CurrentUrlInfo = {
15
- /** Full URL string, e.g. "https://app.com/callback?access_token=abc#hash" */
16
- href: string;
17
- /** Origin, e.g. "https://app.com" */
18
- origin: string;
19
- /** Pathname, e.g. "/callback" */
20
- pathname: string;
21
- /** Query string including "?", e.g. "?access_token=abc" */
22
- search: string;
23
- /** Hash including "#", e.g. "#access_token=abc" */
24
- hash: string;
25
- /** Hostname without port, e.g. "app.com" */
26
- hostname: string;
27
- };
28
- /**
29
- * Options passed to openAuthUrl(). Adapters can use these to decide
30
- * whether to open a popup, redirect, or use a deep link.
31
- */
32
- export type OpenAuthUrlOptions = {
33
- /**
34
- * Preferred presentation mode. Adapters may ignore this and use
35
- * whatever makes sense for the platform.
36
- * - "popup": Open in a popup window (web default)
37
- * - "redirect": Full-page redirect (web fallback)
38
- * - "deeplink": Open with a deep link (React Native)
39
- */
40
- mode?: 'popup' | 'redirect' | 'deeplink';
41
- /** Popup width hint (web only) */
42
- width?: number;
43
- /** Popup height hint (web only) */
44
- height?: number;
45
- /** Origin to watch for the popup to return to (web popup mode only) */
46
- expectedReturnOrigin?: string;
47
- };
48
- /**
49
- * Result returned when the auth flow completes.
50
- * The adapter is responsible for detecting when auth is done and
51
- * returning the tokens from the callback URL.
52
- */
53
- export type AuthCallbackResult = {
54
- /** Raw query string from the callback URL, e.g. "?access_token=abc" */
55
- callbackSearch: string;
56
- /** Raw hash from the callback URL, e.g. "#access_token=abc" */
57
- callbackHash: string;
58
- };
59
- /**
60
- * Optional passkey support. Adapters that do not support passkeys
61
- * return undefined from these methods. The calling code must check
62
- * for undefined before using the result.
63
- */
64
- export type PasskeySupport = {
65
- /**
66
- * Start a passkey registration ceremony.
67
- * @returns Registration response, or undefined if not supported.
68
- */
69
- startRegistration(options: PublicKeyCredentialCreationOptionsJSON): Promise<RegistrationResponseJSON | undefined>;
70
- /**
71
- * Start a passkey authentication ceremony.
72
- * @returns Authentication response, or undefined if not supported.
73
- */
74
- startAuthentication(options: PublicKeyCredentialRequestOptionsJSON): Promise<AuthenticationResponseJSON | undefined>;
75
- };
76
- /**
77
- * Error thrown when the authentication popup is closed by the user
78
- * before authentication completes. Use `instanceof PopupClosedError`
79
- * for type-safe error discrimination instead of string matching.
80
- */
81
- export declare class PopupClosedError extends Error {
82
- constructor(message?: string);
83
- }
84
- /**
85
- * PlatformAdapter abstracts all platform-specific APIs that the
86
- * Passflow SDK needs. Implement this interface to add support for
87
- * a new platform (e.g. React Native).
88
- *
89
- * All methods have sensible defaults in WebAdapter. You only need
90
- * to implement what your platform supports.
91
- */
92
- export interface PlatformAdapter {
93
- /**
94
- * Synchronous key-value storage for tokens and SDK state.
95
- * Must be synchronous. Use localStorage on web, MMKV on React Native.
96
- */
97
- readonly storage: PlatformStorage;
98
- /**
99
- * Returns the current URL of the application.
100
- * On web: wraps window.location.
101
- * On React Native: implement using your routing library (e.g. Linking.getInitialURL).
102
- *
103
- * May return null in environments where URL is not meaningful (e.g. during SSR).
104
- */
105
- getCurrentUrl(): CurrentUrlInfo | null;
106
- /**
107
- * Navigates to the given URL, replacing the current history entry.
108
- * On web: window.history.replaceState(...)
109
- * On React Native: no-op or use your router's replace method.
110
- */
111
- replaceUrl(url: string): void;
112
- /**
113
- * Navigates to the given URL, performing a full navigation.
114
- * On web: window.location.href = url
115
- * On React Native: use Linking.openURL or your router.
116
- */
117
- navigateTo(url: string): void;
118
- /**
119
- * Register a callback invoked when the app comes to the foreground
120
- * (page becomes visible / app resumes).
121
- * Returns an unsubscribe function.
122
- *
123
- * On web: document.addEventListener('visibilitychange', ...)
124
- * On React Native: AppState.addEventListener('change', ...)
125
- */
126
- onForeground(callback: () => void): () => void;
127
- /**
128
- * Register a callback invoked when the app goes to the background
129
- * (page hidden / app suspended).
130
- * Returns an unsubscribe function.
131
- *
132
- * On web: document.addEventListener('visibilitychange', ...)
133
- * On React Native: AppState.addEventListener('change', ...)
134
- *
135
- * NOTE: This method is intentionally not called by the SDK internally.
136
- * It is part of the interface to support React Native adapters which need
137
- * to perform cleanup (e.g., flush queues) when the app is backgrounded.
138
- * Web adapters may implement it as a no-op or use visibilitychange.
139
- */
140
- onBackground(callback: () => void): () => void;
141
- /**
142
- * Register a callback invoked just before the page/app is closed.
143
- * Returns an unsubscribe function.
144
- *
145
- * On web: window.addEventListener('beforeunload', ...)
146
- * On React Native: implement as a no-op (RN handles cleanup differently).
147
- */
148
- onBeforeUnload(callback: () => void): () => void;
149
- /**
150
- * Returns true if the app is currently in the foreground (page visible).
151
- * On web: !document.hidden
152
- * On React Native: AppState.currentState === 'active'
153
- */
154
- isInForeground(): boolean;
155
- /**
156
- * Opens a URL for federated/OAuth authentication.
157
- *
158
- * Web implementation:
159
- * - "popup" mode: Opens a popup via window.open(), polls for the callback,
160
- * resolves when the popup returns to expectedReturnOrigin.
161
- * - "redirect" mode: Full-page redirect (window.location.href = url).
162
- * Returns a Promise that never resolves (page navigates away).
163
- *
164
- * React Native implementation:
165
- * - Opens the URL via Linking.openURL() with a deep link scheme.
166
- * - Resolves when the deep link callback is received.
167
- *
168
- * @returns Promise that resolves with the callback URL tokens,
169
- * or rejects if auth fails or is cancelled.
170
- * In redirect mode on web, the promise may never resolve.
171
- */
172
- openAuthUrl(url: string, options?: OpenAuthUrlOptions): Promise<AuthCallbackResult>;
173
- /**
174
- * Optional passkey support. If the platform does not support passkeys,
175
- * this property is undefined. The SDK checks for undefined before calling.
176
- */
177
- readonly passkeys?: PasskeySupport;
178
- /**
179
- * Encodes a string to Base64.
180
- * On web: btoa(str)
181
- * On React Native: use base64-js or Buffer.
182
- */
183
- btoa(str: string): string;
184
- /**
185
- * Decodes a Base64 string.
186
- * On web: atob(str) or Buffer fallback for SSR.
187
- * On React Native: use base64-js or Buffer.
188
- */
189
- atob(str: string): string;
190
- /**
191
- * Returns true if the platform supports HTTP cookies.
192
- * On web: true (with a quick write/read test).
193
- * On React Native: false. Cookie mode is not available.
194
- *
195
- * When this returns false, cookie token delivery mode must not be used.
196
- * The SDK will throw a descriptive error if cookie mode is configured
197
- * on a platform where cookies are not supported.
198
- */
199
- cookiesSupported(): boolean;
200
- /**
201
- * Returns the platform/device type.
202
- * Used to set the X-Device-Type header on API requests.
203
- */
204
- getDeviceType(): 'web' | 'ios' | 'android';
205
- }
206
- //# sourceMappingURL=types.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../lib/platform/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,0BAA0B,EAC1B,sCAAsC,EACtC,qCAAqC,EACrC,wBAAwB,EACzB,MAAM,yBAAyB,CAAC;AAEjC,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,YAAY,CAAC;AAM1C;;;;GAIG;AACH,MAAM,MAAM,eAAe,GAAG,OAAO,CAAC;AAMtC;;;;GAIG;AACH,MAAM,MAAM,cAAc,GAAG;IAC3B,6EAA6E;IAC7E,IAAI,EAAE,MAAM,CAAC;IACb,qCAAqC;IACrC,MAAM,EAAE,MAAM,CAAC;IACf,iCAAiC;IACjC,QAAQ,EAAE,MAAM,CAAC;IACjB,2DAA2D;IAC3D,MAAM,EAAE,MAAM,CAAC;IACf,mDAAmD;IACn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M,IAAI,GAAG,MAAM,IAAI,CAAC;IAE/C;;;;;;;;;;;;OAYG;IACH,YAAY,CAAC,QAAQ,EAAE,MAAM,IAAI,GAAG,MAAM,IAAI,CAAC;IAE/C;;;;;;OAMG;IACH,cAAc,CAAC,QAAQ,EAAE,MAAM,IAAI,GAAG,MAAM,IAAI,CAAC;IAEjD;;;;OAIG;IACH,cAAc,IAAI,OAAO,CAAC;IAI1B;;;;;;;;;;;;;;;;OAgBG;IACH,WAAW,CAAC,GAAG,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,kBAAkB,GAAG,OAAO,CAAC,kBAAkB,CAAC,CAAC;IAIpF;;;OAGG;IACH,QAAQ,CAAC,QAAQ,CAAC,EAAE,cAAc,CAAC;IAInC;;;;OAIG;IACH,IAAI,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAAC;IAE1B;;;;OAIG;IACH,IAAI,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAAC;IAI1B;;;;;;;;OAQG;IACH,gBAAgB,IAAI,OAAO,CAAC;IAI5B;;;OAGG;IACH,aAAa,IAAI,KAAK,GAAG,KAAK,GAAG,SAAS,CAAC;CAC5C"}
@@ -1,104 +0,0 @@
1
- import { type AuthCallbackResult, type CurrentUrlInfo, type OpenAuthUrlOptions, type PasskeySupport, type PlatformAdapter, type PlatformStorage } from './types';
2
- export declare class WebAdapter implements PlatformAdapter {
3
- get storage(): PlatformStorage;
4
- /**
5
- * Replaces:
6
- * window.location.origin (passflow.ts:95, axios-client.ts:49)
7
- * window.location.search (passflow.ts:338,416, auth-service.ts:610,826)
8
- * window.location.hash (passflow.ts:342)
9
- * window.location.href (auth-service.ts:826)
10
- * window.location.pathname (passflow.ts:429,441,443)
11
- * window?.location?.hostname (user-service.ts:57)
12
- */
13
- getCurrentUrl(): CurrentUrlInfo | null;
14
- /**
15
- * Replaces:
16
- * window.history.replaceState({}, document.title, ...)
17
- * (passflow.ts:429, 441, 443)
18
- */
19
- replaceUrl(url: string): void;
20
- /**
21
- * Replaces:
22
- * window.location.href = url
23
- * (auth-service.ts:795, 813, 845, passflow.ts indirectly)
24
- */
25
- navigateTo(url: string): void;
26
- /**
27
- * Replaces:
28
- * document.addEventListener('visibilitychange', handler) where !document.hidden
29
- * (token-cache-service.ts:134-145)
30
- */
31
- onForeground(callback: () => void): () => void;
32
- /**
33
- * Replaces:
34
- * document.addEventListener('visibilitychange', handler) where document.hidden
35
- * (token-cache-service.ts:134-145, complementary to onForeground)
36
- *
37
- * NOTE: Not currently called by the SDK. Included in the interface for
38
- * React Native adapter compatibility (future use).
39
- */
40
- onBackground(callback: () => void): () => void;
41
- /**
42
- * Replaces:
43
- * window.addEventListener('beforeunload', ...)
44
- * (token-cache-service.ts:151)
45
- */
46
- onBeforeUnload(callback: () => void): () => void;
47
- /**
48
- * Replaces:
49
- * typeof document !== 'undefined' && document.hidden
50
- * (token-cache-service.ts:112)
51
- */
52
- isInForeground(): boolean;
53
- /**
54
- * Replaces:
55
- * window.open(passflowURL, '_blank', `width=...,height=...`)
56
- * + polling loop with popupWindow.location.href/search
57
- * + window.location.href = origin (post-auth redirect)
58
- * (auth-service.ts:741-805)
59
- *
60
- * window.location.href = passflowURL (redirect mode)
61
- * (auth-service.ts:813)
62
- */
63
- openAuthUrl(url: string, options?: OpenAuthUrlOptions): Promise<AuthCallbackResult>;
64
- /**
65
- * Replaces:
66
- * startRegistration({ optionsJSON: publicKey }) from @simplewebauthn/browser
67
- * (auth-service.ts:645-646, user-service.ts:65)
68
- *
69
- * startAuthentication({ optionsJSON: publicKey }) from @simplewebauthn/browser
70
- * (auth-service.ts:681)
71
- */
72
- readonly passkeys: PasskeySupport;
73
- /**
74
- * Replaces:
75
- * btoa(publicKey.user.id)
76
- * (auth-service.ts:644, user-service.ts:64)
77
- */
78
- btoa(str: string): string;
79
- /**
80
- * Replaces:
81
- * window.atob(base64) / Buffer.from(base64, 'base64').toString('utf-8')
82
- * (token/service.ts:26-27)
83
- */
84
- atob(str: string): string;
85
- /**
86
- * Replaces:
87
- * document.cookie write/read test
88
- * (axios-client.ts:221-223)
89
- */
90
- cookiesSupported(): boolean;
91
- /**
92
- * Replaces:
93
- * Hardcoded 'web' string in DEVICE_TYPE_HEADER_KEY header
94
- * (axios-client.ts:91)
95
- * OS.web enum value (auth-service.ts:244, 358, 637, 676, user-service.ts:55)
96
- */
97
- getDeviceType(): 'web' | 'ios' | 'android';
98
- }
99
- /**
100
- * Singleton instance used as the default adapter.
101
- * Exported so consuming code can reference it without allocating a new instance.
102
- */
103
- export declare const webAdapter: WebAdapter;
104
- //# sourceMappingURL=web-adapter.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"web-adapter.d.ts","sourceRoot":"","sources":["../../../lib/platform/web-adapter.ts"],"names":[],"mappings":"AAEA,OAAO,EACL,KAAK,kBAAkB,EACvB,KAAK,cAAc,EACnB,KAAK,kBAAkB,EACvB,KAAK,cAAc,EACnB,KAAK,eAAe,EACpB,KAAK,eAAe,EAErB,MAAM,SAAS,CAAC;AAEjB,qBAAa,UAAW,YAAW,eAAe;IAMhD,IAAI,OAAO,IAAI,eAAe,CAY7B;IAMD;;;;;;;;OAQG;IACH,aAAa,IAAI,cAAc,GAAG,IAAI,CAUrC;IAED;;;;OAIG;IACH,UAAU,CAAC,GAAG,EAAE,MAAM,GAAG,IAAI,CAG5B;IAED;;;;OAIG;IACH,UAAU,CAAC,GAAG,EAAE,MAAM,GAAG,IAAI,CAG5B;IAMD;;;;OAIG;IACH,YAAY,CAAC,QAAQ,EAAE,MAAM,IAAI,GAAG,MAAM,IAAI,CAU7C;IAED;;;;;;;OAOG;IACH,YAAY,CAAC,QAAQ,EAAE,MAAM,IAAI,GAAG,MAAM,IAAI,CAU7C;IAED;;;;OAIG;IACH,cAAc,CAAC,QAAQ,EAAE,MAAM,IAAI,GAAG,MAAM,IAAI,CAO/C;IAED;;;;OAIG;IACH,cAAc,IAAI,OAAO,CAGxB;IAMD;;;;;;;;;OASG;IACH,WAAW,CAAC,GAAG,EAAE,MAAM,EAAE,OAAO,GAAE,kBAAuB,GAAG,OAAO,CAAC,kBAAkB,CAAC,CAiEtF;IAMD;;;;;;;OAOG;IACH,QAAQ,CAAC,QAAQ,EAAE,cAAc,CAG/B;IAMF;;;;OAIG;IACH,IAAI,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAExB;IAED;;;;OAIG;IACH,IAAI,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAQxB;IAMD;;;;OAIG;IACH,gBAAgB,IAAI,OAAO,CAU1B;IAMD;;;;;OAKG;IACH,aAAa,IAAI,KAAK,GAAG,KAAK,GAAG,SAAS,CAEzC;CACF;AAED;;;GAGG;AACH,eAAO,MAAM,UAAU,YAAmB,CAAC"}
@@ -1,197 +0,0 @@
1
- import { AuthAPI, PassflowAuthorizationResponse, PassflowFederatedAuthExtendedPayload, PassflowFederatedAuthPayload, PassflowPasskeyAuthenticateStartPayload, PassflowPasskeyRegisterStartPayload, PassflowPasswordlessResponse, PassflowPasswordlessSignInCompletePayload, PassflowPasswordlessSignInPayload, PassflowSendPasswordResetEmailPayload, PassflowSignInPayload, PassflowSignUpPayload, PassflowSuccessResponse, PassflowValidationResponse, TokenExchangeConfig, type UpgradeRefreshField } from '../api';
2
- import { DeviceService } from '../device';
3
- import { type PlatformAdapter } from '../platform';
4
- import { StorageManager } from '../storage';
5
- import { PassflowStore } from '../store';
6
- import { ParsedTokens, Tokens } from '../types';
7
- import { type UpgradeSessionPin } from '../upgrade/session';
8
- import { TokenCacheService } from './token-cache-service';
9
- /**
10
- * Service for handling authentication related functionality
11
- */
12
- export declare class AuthService {
13
- private authApi;
14
- private deviceService;
15
- private storageManager;
16
- private subscribeStore;
17
- private tokenCacheService;
18
- private scopes;
19
- private createTenantForNewUser;
20
- private url;
21
- private sessionCallbacks;
22
- private appId?;
23
- private platform;
24
- private readPkceEnabled?;
25
- private tokenDeliveryManager;
26
- private tokenExchangeConfig?;
27
- private pendingPkce?;
28
- constructor(authApi: AuthAPI, deviceService: DeviceService, storageManager: StorageManager, subscribeStore: PassflowStore, tokenCacheService: TokenCacheService, scopes: string[], createTenantForNewUser: boolean, url: string, sessionCallbacks: {
29
- createSession?: ({ tokens, parsedTokens }: {
30
- tokens?: Tokens;
31
- parsedTokens?: ParsedTokens;
32
- }) => Promise<void>;
33
- expiredSession?: () => Promise<void>;
34
- }, appId?: string | undefined, tokenExchangeConfig?: TokenExchangeConfig, platform?: PlatformAdapter, readPkceEnabled?: (() => Promise<boolean>) | undefined);
35
- /**
36
- * Initialize session state on page load for cookie/BFF mode
37
- */
38
- private initializeSession;
39
- /**
40
- * Restore session for cookie/BFF mode on page load
41
- * Validates that HttpOnly cookies are still valid
42
- * @returns true if session is valid, false otherwise
43
- */
44
- restoreSession(): Promise<boolean>;
45
- /**
46
- * Process successful authentication response
47
- * Handles token storage, session state, CSRF tokens
48
- * In BFF mode, forwards tokens to BFF server
49
- */
50
- private processAuthResponse;
51
- /**
52
- * Reports whether a sign-in response is still waiting on its second factor,
53
- * and when it is, hands the 2FA token on.
54
- *
55
- * Every sign-in path can end this way: the server answers with a
56
- * `tfa_token` (or `requires_2fa`) in place of tokens. That response is not
57
- * a session, so on `true` the caller returns it as it is — without
58
- * `processAuthResponse`, a `SignIn`/`Register` event or a session check.
59
- * The `TwoFactorRequired` event is what the TwoFactorService listens to, so
60
- * its verify and recovery calls can carry the token. On a PKCE sign-in the
61
- * server keeps the login's challenge, so the second factor's answer is a code:
62
- * the verifier stays here for `completePkceSignIn`, off the public event.
63
- */
64
- private handlePendingSecondFactor;
65
- /**
66
- * Keeps the verifier in memory, which is where it is read from first. The copy
67
- * in sessionStorage is only for a redirect or reload during the second factor,
68
- * which would otherwise lose the sign-in.
69
- */
70
- private rememberPkceSignIn;
71
- private readPendingPkce;
72
- /** Whether a PKCE sign-in is waiting for the code its second factor answers with. */
73
- hasPendingPkceSignIn(): boolean;
74
- /** Drops the verifier of a pending sign-in. `TwoFactorService` calls this with its own state. */
75
- forgetPkceSignIn(): void;
76
- /**
77
- * The proof key for a sign-in on a PKCE app, undefined on any other app.
78
- *
79
- * It is sent whether or not the sign-in has a parent: the parent is added to
80
- * the request outside this SDK, so it is not visible here, and `pkce.Challenge`
81
- * on the server wants it under a device parent and ignores it under an OIDC one.
82
- * When the setting cannot be read the sign-in goes out without a challenge, and
83
- * a PKCE app refuses it with its own error.
84
- */
85
- private startPkce;
86
- /**
87
- * Swaps a code in a sign-in's answer for what the code stands for; any other
88
- * answer passes through. That can still be a 2FA token: the server re-runs its
89
- * gate at the exchange unless the code records a passed second factor.
90
- */
91
- private exchangeCode;
92
- /**
93
- * Finishes a PKCE sign-in whose code came from its second factor: redeems the
94
- * code with the first factor's verifier and applies the tokens. `TwoFactorService`
95
- * is the caller, and clears the pending state once this has succeeded.
96
- */
97
- completePkceSignIn(code: string): Promise<PassflowAuthorizationResponse>;
98
- /**
99
- * Applies tokens that were issued outside this service, honouring the delivery
100
- * mode: this is the one place they reach the BFF and browser storage, so no
101
- * caller saves them itself. An answer that carries no tokens is left alone.
102
- */
103
- applyTokens(tokens: Tokens): Promise<void>;
104
- /**
105
- * Forward tokens to BFF server for httpOnly cookie storage
106
- */
107
- private forwardTokensToBFF;
108
- signIn(payload: PassflowSignInPayload): Promise<PassflowAuthorizationResponse>;
109
- signUp(payload: PassflowSignUpPayload): Promise<PassflowAuthorizationResponse>;
110
- passwordlessSignIn(payload: PassflowPasswordlessSignInPayload): Promise<PassflowPasswordlessResponse>;
111
- passwordlessSignInComplete(payload: PassflowPasswordlessSignInCompletePayload): Promise<PassflowValidationResponse>;
112
- logOut(): Promise<void>;
113
- /**
114
- * The session and user identity this client currently holds, or `undefined`
115
- * when none is readable.
116
- *
117
- * Read from the stored access token's claims, which is the same source every
118
- * other client-side session fact comes from. In a delivery mode that keeps
119
- * the access token out of reach — a cookie-mode or BFF session — there is
120
- * nothing to read and the answer is `undefined`.
121
- */
122
- readSessionPin(): UpgradeSessionPin | undefined;
123
- /**
124
- * Refuses to APPLY tokens that belong to a different principal (§13.4
125
- * revision 6 / H2).
126
- *
127
- * Called immediately before the rotated tokens are written, which is the only
128
- * place the check cannot be bypassed: the epoch guard around `prepare` and
129
- * `commit` runs before the server call, and token application happens after
130
- * it returns, so a logout and re-login in between let user A's flight write
131
- * over user B's session.
132
- *
133
- * It throws `UpgradeSessionChangedError`, so the elevation terminates as
134
- * §13.3's `session changed mid-flight` on every surface — the outcome class
135
- * itself, not a transport failure that happens to carry the kind: this is the
136
- * only entry point into token application, so a caller holding the promise
137
- * directly (`AuthService.refreshToken`) must see the same `code` a waiter
138
- * behind the controller does. It does NOT invalidate
139
- * anything: `setSessionInvalid()` runs off a positive allow-list elsewhere,
140
- * and the live user is never logged out as a side effect of someone else's
141
- * abandoned flight. Fail-closed on token application, fail-open on session
142
- * state — two different axes.
143
- */
144
- private assertSessionPin;
145
- /**
146
- * Refreshes the session, optionally committing an assurance upgrade.
147
- *
148
- * This is the ONLY token-storing path for all four delivery modes, which is
149
- * why the upgrade commit goes through here rather than posting to
150
- * `/auth/refresh` directly: it saves the rotated tokens, updates the cache and
151
- * emits `Refresh`. Bypassing it would elevate the session on the server and
152
- * leave the client holding stale tokens — everything looks fine until the next
153
- * request 401s.
154
- *
155
- * An upgrade commit changes the error handling in one specific way: a 4xx is
156
- * NOT treated as a dead session. The server answers a wrong code with a 401,
157
- * and tearing the session down there is the logout-at-step-up defect. The
158
- * upgrade transport classifies those failures and invalidates the session
159
- * itself when the 401 turns out to be a genuine expiry.
160
- */
161
- refreshToken(upgrade?: UpgradeRefreshField, pin?: UpgradeSessionPin): Promise<PassflowAuthorizationResponse>;
162
- sendPasswordResetEmail(payload: PassflowSendPasswordResetEmailPayload): Promise<PassflowSuccessResponse>;
163
- resetPassword(newPassword: string, scopes?: string[]): Promise<PassflowAuthorizationResponse>;
164
- passkeyRegister(payload: PassflowPasskeyRegisterStartPayload): Promise<PassflowAuthorizationResponse>;
165
- passkeyAuthenticate(payload: PassflowPasskeyAuthenticateStartPayload): Promise<PassflowAuthorizationResponse>;
166
- createFederatedAuthUrl(payload: PassflowFederatedAuthExtendedPayload): string;
167
- federatedAuthWithPopup(payload: PassflowFederatedAuthPayload): Promise<void>;
168
- federatedAuthWithRedirect(payload: PassflowFederatedAuthPayload): void;
169
- authRedirectUrl(options?: {
170
- url?: string;
171
- redirectUrl?: string;
172
- scopes?: string[];
173
- appId?: string;
174
- }): string;
175
- authRedirect(options?: {
176
- url?: string;
177
- redirectUrl?: string;
178
- scopes?: string[];
179
- appId?: string;
180
- }): void;
181
- /**
182
- * Check if user is authenticated
183
- * CRITICAL: Cookie/BFF mode checks ID token + session state, NOT access_token
184
- */
185
- isAuthenticated(parsedTokens: ParsedTokens): boolean;
186
- /**
187
- * Handle session check and callbacks
188
- */
189
- submitSessionCheck(doRefresh?: boolean): Promise<Tokens | undefined>;
190
- /**
191
- * Get tokens and refresh if needed
192
- * Cookie/BFF mode: Returns ID token only (access/refresh in HttpOnly cookies)
193
- * JSON mode: Returns all tokens from localStorage
194
- */
195
- getTokens(doRefresh: boolean): Promise<Tokens | undefined>;
196
- }
197
- //# sourceMappingURL=auth-service.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"auth-service.d.ts","sourceRoot":"","sources":["../../../lib/services/auth-service.ts"],"names":[],"mappings":"AACA,OAAO,EACL,OAAO,EAEP,6BAA6B,EAE7B,oCAAoC,EACpC,4BAA4B,EAC5B,uCAAuC,EACvC,mCAAmC,EACnC,4BAA4B,EAC5B,yCAAyC,EACzC,iCAAiC,EACjC,qCAAqC,EACrC,qBAAqB,EACrB,qBAAqB,EACrB,uBAAuB,EACvB,0BAA0B,EAC1B,mBAAmB,EACnB,KAAK,mBAAmB,EACzB,MAAM,QAAQ,CAAC;AAChB,OAAO,EAAE,aAAa,EAAE,MAAM,WAAW,CAAC;AAE1C,OAAO,EAAE,KAAK,eAAe,EAAgC,MAAM,aAAa,CAAC;AACjF,OAAO,EAAE,cAAc,EAAE,MAAM,YAAY,CAAC;A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CAAC,SAAS,EAAE,OAAO,GAAG,OAAO,CAAC,MAAM,GAAG,SAAS,CAAC,CAyC/D;CACF"}
@@ -1,8 +0,0 @@
1
- export * from './auth-service';
2
- export * from './invitation-service';
3
- export * from './tenant-service';
4
- export * from './tenant-user-membership';
5
- export * from './token-cache-service';
6
- export * from './two-factor-service';
7
- export * from './user-service';
8
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../lib/services/index.ts"],"names":[],"mappings":"AAAA,cAAc,gBAAgB,CAAC;AAC/B,cAAc,sBAAsB,CAAC;AACrC,cAAc,kBAAkB,CAAC;AACjC,cAAc,0BAA0B,CAAC;AACzC,cAAc,uBAAuB,CAAC;AACtC,cAAc,sBAAsB,CAAC;AACrC,cAAc,gBAAgB,CAAC"}
@@ -1,44 +0,0 @@
1
- import type { InvitationAPI, InvitationsPaginatedList, InviteLinkResponse, PassflowSuccessResponse, RequestInviteLinkPayload } from '../api';
2
- /**
3
- * Service for managing invitations
4
- */
5
- export declare class InvitationService {
6
- private invitationApi;
7
- constructor(invitationApi: InvitationAPI);
8
- /**
9
- * Requests an invitation link that can be used to invite users
10
- * @param payload Request invitation payload
11
- * @returns Promise with invitation link and token
12
- */
13
- requestInviteLink(payload: RequestInviteLinkPayload): Promise<InviteLinkResponse>;
14
- /**
15
- * Gets a list of active invitations
16
- * @param options Optional parameters for filtering and pagination
17
- * @returns Promise with paginated list of invitations
18
- */
19
- getInvitations(options: {
20
- tenantID: string;
21
- groupID?: string;
22
- skip?: number | string;
23
- limit?: number | string;
24
- }): Promise<InvitationsPaginatedList>;
25
- /**
26
- * Deletes an invitation by token
27
- * @param token The invitation token to delete
28
- * @returns Promise with success response
29
- */
30
- deleteInvitation(token: string): Promise<PassflowSuccessResponse>;
31
- /**
32
- * Resends an invitation by token
33
- * @param token The invitation token to resend
34
- * @returns Promise with success response
35
- */
36
- resendInvitation(token: string): Promise<PassflowSuccessResponse>;
37
- /**
38
- * Gets a link to an invitation by id
39
- * @param invitationID The invitation ID to get link
40
- * @returns Promise with the link
41
- */
42
- getInvitationLink(invitationID: string): Promise<InviteLinkResponse>;
43
- }
44
- //# sourceMappingURL=invitation-service.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"invitation-service.d.ts","sourceRoot":"","sources":["../../../lib/services/invitation-service.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,aAAa,EACb,wBAAwB,EACxB,kBAAkB,EAClB,uBAAuB,EACvB,wBAAwB,EACzB,MAAM,QAAQ,CAAC;AAEhB;;GAEG;AACH,qBAAa,iBAAiB;IAChB,OAAO,CAAC,aAAa;IAAjC,YAAoB,aAAa,EAAE,aAAa,EAAI;IAEpD;;;;OAIG;IACH,iBAAiB,CAAC,OAAO,EAAE,wBAAwB,GAAG,OAAO,CAAC,kBAAkB,CAAC,CAEhF;IAED;;;;OAIG;IACH,cAAc,CAAC,OAAO,EAAE;QACtB,QAAQ,EAAE,MAAM,CAAC;QACjB,OAAO,CAAC,EAAE,MAAM,CAAC;QACjB,IAAI,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;QACvB,KAAK,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;KACzB,GAAG,OAAO,CAAC,wBAAwB,CAAC,CAEpC;IAED;;;;OAIG;IACH,gBAAgB,CAAC,KAAK,EAAE,MAAM,GAAG,OAAO,CAAC,uBAAuB,CAAC,CAEhE;IAED;;;;OAIG;IACH,gBAAgB,CAAC,KAAK,EAAE,MAAM,GAAG,OAAO,CAAC,uBAAuB,CAAC,CAEhE;IAED;;;;OAIG;IACH,iBAAiB,CAAC,YAAY,EAAE,MAAM,GAAG,OAAO,CAAC,kBAAkB,CAAC,CAEnE;CACF"}