@movmo_app/react-common 0.16.0 → 0.17.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.cjs +27 -27
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.ts +2 -52
- package/dist/index.es.js +3967 -4060
- package/dist/index.es.js.map +1 -1
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -345,14 +345,8 @@ export declare interface ModalProps {
|
|
|
345
345
|
|
|
346
346
|
/** Typed client for every Movmo sign-in and passkey-management call. */
|
|
347
347
|
export declare interface MovmoAuthApi {
|
|
348
|
-
/**
|
|
349
|
-
|
|
350
|
-
* email's flow is created without sending a code (`sendCode` releases the
|
|
351
|
-
* first send); used by the partner iframe.
|
|
352
|
-
*/
|
|
353
|
-
login(email: string, opts?: {
|
|
354
|
-
deferCode?: boolean;
|
|
355
|
-
}): Promise<MovmoLoginResponse>;
|
|
348
|
+
/** `POST /v1/auth/login`. */
|
|
349
|
+
login(email: string): Promise<MovmoLoginResponse>;
|
|
356
350
|
sendCode(flowId: string): Promise<MovmoCodeFlow>;
|
|
357
351
|
/**
|
|
358
352
|
* `POST /v1/auth/recovery {flow_id, time_zone?}`: starts account recovery for
|
|
@@ -398,19 +392,10 @@ export declare interface MovmoSignIn {
|
|
|
398
392
|
recoveryAvailable: boolean;
|
|
399
393
|
/** Recovery step: the server refused recovery (`recovery_blocked`); terminal, only Close remains. */
|
|
400
394
|
recoveryBlocked: boolean;
|
|
401
|
-
/**
|
|
402
|
-
* Framed passkeys: the browser won't run the passkey ceremony in this frame
|
|
403
|
-
* (`topOrigin_required`, or remembered). The passkey step offers `continueTopLevel`.
|
|
404
|
-
*/
|
|
405
|
-
topLevelRequired: boolean;
|
|
406
|
-
/** Framed window with `framedPasskeys`: the passkey step always offers "Continue in a new window". */
|
|
407
|
-
framedPasskeys: boolean;
|
|
408
395
|
liveMessage: string;
|
|
409
396
|
submitEmail(): void;
|
|
410
397
|
signInWithPasskey(): void;
|
|
411
398
|
retryPasskey(): void;
|
|
412
|
-
/** Passkey step, `topLevelRequired`: calls `onContinueTopLevel` synchronously (inside the click). */
|
|
413
|
-
continueTopLevel(): void;
|
|
414
399
|
/** Passkey step: "I can't use my passkey" → the recovery step (aborts the ceremony). No-op on re-auth. */
|
|
415
400
|
cantUsePasskey(): void;
|
|
416
401
|
/** Recovery step: `POST /v1/auth/recovery`, then the code step. */
|
|
@@ -807,11 +792,6 @@ export declare const signInCopy: {
|
|
|
807
792
|
readonly passkeyUnavailable: "This browser couldn't use a passkey. Choose 'I can't use my passkey' to sign in with a code.";
|
|
808
793
|
readonly discoverableNotRecognized: "That passkey isn't recognized. Continue with your email instead.";
|
|
809
794
|
readonly recoveryStarted: "Sign in without your passkey";
|
|
810
|
-
/** Framed passkeys (MOVMO-686): the browser won't run the passkey ceremony inside the frame. */
|
|
811
|
-
readonly topLevelRequired: "Your browser needs a separate window to use your passkey.";
|
|
812
|
-
readonly continueTopLevel: "Continue in a new window";
|
|
813
|
-
/** Framed passkeys: any browser-side failure; never points a framed user at account recovery first. */
|
|
814
|
-
readonly framedPasskeyFailed: "Your passkey didn't work here. Try again, or continue in a new window.";
|
|
815
795
|
readonly recoveryBlocked: "We can't recover this account right now";
|
|
816
796
|
};
|
|
817
797
|
|
|
@@ -959,36 +939,6 @@ export declare interface UseMovmoSignInOptions {
|
|
|
959
939
|
*/
|
|
960
940
|
expectedUserId?: string;
|
|
961
941
|
promptSurface?: 'modal' | 'connect';
|
|
962
|
-
/**
|
|
963
|
-
* A framed window may run the email-first passkey `get()` (the embedding SDK
|
|
964
|
-
* granted `publickey-credentials-get` on the iframe). Default false. Never
|
|
965
|
-
* enables autofill, the passkey button, enrollment or `create()`.
|
|
966
|
-
*/
|
|
967
|
-
framedPasskeys?: boolean;
|
|
968
|
-
/**
|
|
969
|
-
* The `/v1/auth/login` response the app already obtained, expected from
|
|
970
|
-
* `api.login(email, { deferCode: true })`: adopted on mount instead of asking
|
|
971
|
-
* for an email. `next:"passkey"` runs the ceremony at once (the app must call
|
|
972
|
-
* within the click's transient activation, ~5 s); `next:"code"` sends the first
|
|
973
|
-
* code (`/v1/auth/code` on the deferred flow) and shows the code step. The
|
|
974
|
-
* email comes from `initialEmail` / `lockedEmail`. `api.login` is not called.
|
|
975
|
-
*/
|
|
976
|
-
resumeLogin?: MovmoLoginResponse;
|
|
977
|
-
/**
|
|
978
|
-
* `continueTopLevel()` calls this synchronously (the app opens its popup
|
|
979
|
-
* inside the click; nothing may `await` before it) with the flow's current
|
|
980
|
-
* email, the one the ceremony ran for (it may differ from `initialEmail`
|
|
981
|
-
* after an email change).
|
|
982
|
-
*/
|
|
983
|
-
onContinueTopLevel?: (email: string) => void;
|
|
984
|
-
/**
|
|
985
|
-
* With `resumeLogin`: the passkey/code step's "Change" calls this instead of showing the
|
|
986
|
-
* hook's own email step, and the host owns the email change. That step
|
|
987
|
-
* calls `api.login` without `deferCode`, which would send a code at once and
|
|
988
|
-
* sign a code user in inside the frame, bypassing the host's popup rule.
|
|
989
|
-
* Without `resumeLogin` or without this, behaviour is unchanged.
|
|
990
|
-
*/
|
|
991
|
-
onChangeEmail?: () => void;
|
|
992
942
|
}
|
|
993
943
|
|
|
994
944
|
export declare const validateEmail: (email: string) => boolean;
|