@atlasauth/expo 0.8.0 → 0.10.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/CHANGELOG.md +16 -0
- package/dist/index.d.ts +3 -0
- package/dist/index.js +4 -0
- package/dist/index.js.map +1 -1
- package/dist/push-devices.d.ts +35 -0
- package/dist/push-devices.js +44 -0
- package/dist/push-devices.js.map +1 -0
- package/dist/screens-hook.d.ts +54 -0
- package/dist/screens-hook.js +42 -0
- package/dist/screens-hook.js.map +1 -0
- package/dist/screens.d.ts +41 -0
- package/dist/screens.js +39 -0
- package/dist/screens.js.map +1 -0
- package/dist/social.d.ts +8 -1
- package/dist/social.js +41 -0
- package/dist/social.js.map +1 -1
- package/package.json +3 -3
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,15 @@
|
|
|
1
1
|
# @atlasauth/expo changelog
|
|
2
2
|
|
|
3
|
+
## 0.9.0 — 2026-11-14
|
|
4
|
+
|
|
5
|
+
- `useSignInScreen()` and `useSecuritySection(kind)` drive your own native sign-in and account-security screens, with step-up handled inside.
|
|
6
|
+
|
|
7
|
+
## 0.8.0 — 2026-11-14
|
|
8
|
+
|
|
9
|
+
- `useStepUp()` / `withStepUp(fn)` re-verify the bearer session with the factors the account holds (passkey through `@atlasauth/expo-passkeys`) and retry the wrapped call.
|
|
10
|
+
- `useAccountSecurity` / `createAccountSecurityActions` carry the security-page helpers from `@atlasauth/js`.
|
|
11
|
+
- New entry `@atlasauth/expo/account-security`: no React Native import, `sideEffects: false`, usable in plain Node.
|
|
12
|
+
|
|
3
13
|
## 0.7.0 — 2026-11-13
|
|
4
14
|
|
|
5
15
|
- `useAccountSecurity` / `createAccountSecurityActions` add `revokeAllTrustedDevices`.
|
|
@@ -20,6 +30,12 @@
|
|
|
20
30
|
|
|
21
31
|
## Unreleased
|
|
22
32
|
|
|
33
|
+
## 0.10.0 — 2026-11-14
|
|
34
|
+
|
|
35
|
+
- `usePushDevices()` registers a phone for "Approve in your app" without enrolling push as a second factor.
|
|
36
|
+
- `useStepUp` offers a texted code (`phone_code`) when the account has a verified phone.
|
|
37
|
+
- Requires `@atlasauth/js` 0.44.0 or later.
|
|
38
|
+
|
|
23
39
|
### Added
|
|
24
40
|
|
|
25
41
|
- `useAppApproval(id)`: approve-in-your-app for the signed-in app. Reads the pending request, polls while it is pending, and offers `approve(number)` and `deny()` with the shuffled number choices.
|
package/dist/index.d.ts
CHANGED
|
@@ -7,7 +7,10 @@ export * from './policies';
|
|
|
7
7
|
export * from './social';
|
|
8
8
|
export * from './bridge';
|
|
9
9
|
export * from './app-approval';
|
|
10
|
+
export * from './push-devices';
|
|
10
11
|
export * from './account-security';
|
|
11
12
|
export { getCaptchaToken, solveAtlasChallengeNative, atlasHeadlessCaptchaSolver, installAtlasCaptchaSolver, type SolveCaptchaOptions, type GetCaptchaTokenOptions, } from '@atlasauth/react-native';
|
|
12
13
|
export * from './account-security-hook';
|
|
13
14
|
export * from './step-up';
|
|
15
|
+
export * from './screens';
|
|
16
|
+
export * from './screens-hook';
|
package/dist/index.js
CHANGED
|
@@ -50,6 +50,7 @@ __exportStar(require("./policies"), exports);
|
|
|
50
50
|
__exportStar(require("./social"), exports);
|
|
51
51
|
__exportStar(require("./bridge"), exports);
|
|
52
52
|
__exportStar(require("./app-approval"), exports);
|
|
53
|
+
__exportStar(require("./push-devices"), exports);
|
|
53
54
|
__exportStar(require("./account-security"), exports);
|
|
54
55
|
// Captcha with no browser: the proof-of-work solver for Hermes/JSC. Importing this
|
|
55
56
|
// package installs it as the headless solver, so the sign-in / sign-up / reset
|
|
@@ -61,4 +62,7 @@ Object.defineProperty(exports, "atlasHeadlessCaptchaSolver", { enumerable: true,
|
|
|
61
62
|
Object.defineProperty(exports, "installAtlasCaptchaSolver", { enumerable: true, get: function () { return react_native_1.installAtlasCaptchaSolver; } });
|
|
62
63
|
__exportStar(require("./account-security-hook"), exports);
|
|
63
64
|
__exportStar(require("./step-up"), exports);
|
|
65
|
+
// Sign-in and account-security screens as view-models (steps, methods, fields, human errors, step-up inside).
|
|
66
|
+
__exportStar(require("./screens"), exports);
|
|
67
|
+
__exportStar(require("./screens-hook"), exports);
|
|
64
68
|
//# sourceMappingURL=index.js.map
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;AAAA,2EAA2E;AAC3E,kEAAkE;AAClE,gDAA8B;AAC9B,gDAA8B;AAC9B,kDAAgC;AAEhC,8EAA8E;AAC9E,mDAAiC;AAEjC;;;;;;;;;;GAUG;AACH,0CAW0B;AAVxB,gGAAA,OAAO,OAAA;AACP,gGAAA,OAAO,OAAA;AACP,mGAAA,UAAU,OAAA;AACV,uGAAA,cAAc,OAAA;AACd,wGAAA,eAAe,OAAA;AACf,iGAAA,QAAQ,OAAA;AACR,kGAAA,SAAS,OAAA;AACT,gGAAA,OAAO,OAAA;AACP,qGAAA,YAAY,OAAA;AACZ,oGAAA,WAAW,OAAA;AAGb,oGAAoG;AACpG,6CAA2B;AAE3B,mGAAmG;AACnG,2CAAyB;AACzB,2CAAyB;AACzB,iDAA+B;AAC/B,qDAAmC;AAEnC,mFAAmF;AACnF,+EAA+E;AAC/E,4DAA4D;AAC5D,wDAOiC;AAN/B,+GAAA,eAAe,OAAA;AACf,yHAAA,yBAAyB,OAAA;AACzB,0HAAA,0BAA0B,OAAA;AAC1B,yHAAA,yBAAyB,OAAA;AAI3B,0DAAwC;AACxC,4CAA0B"}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;AAAA,2EAA2E;AAC3E,kEAAkE;AAClE,gDAA8B;AAC9B,gDAA8B;AAC9B,kDAAgC;AAEhC,8EAA8E;AAC9E,mDAAiC;AAEjC;;;;;;;;;;GAUG;AACH,0CAW0B;AAVxB,gGAAA,OAAO,OAAA;AACP,gGAAA,OAAO,OAAA;AACP,mGAAA,UAAU,OAAA;AACV,uGAAA,cAAc,OAAA;AACd,wGAAA,eAAe,OAAA;AACf,iGAAA,QAAQ,OAAA;AACR,kGAAA,SAAS,OAAA;AACT,gGAAA,OAAO,OAAA;AACP,qGAAA,YAAY,OAAA;AACZ,oGAAA,WAAW,OAAA;AAGb,oGAAoG;AACpG,6CAA2B;AAE3B,mGAAmG;AACnG,2CAAyB;AACzB,2CAAyB;AACzB,iDAA+B;AAC/B,iDAA+B;AAC/B,qDAAmC;AAEnC,mFAAmF;AACnF,+EAA+E;AAC/E,4DAA4D;AAC5D,wDAOiC;AAN/B,+GAAA,eAAe,OAAA;AACf,yHAAA,yBAAyB,OAAA;AACzB,0HAAA,0BAA0B,OAAA;AAC1B,yHAAA,yBAAyB,OAAA;AAI3B,0DAAwC;AACxC,4CAA0B;AAE1B,8GAA8G;AAC9G,4CAA0B;AAC1B,iDAA+B"}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import { type FapiClient, type PendingPushDevice, type PushDevice } from '@atlasauth/js';
|
|
2
|
+
export interface PushDevicesController {
|
|
3
|
+
/** The device just registered, awaiting its number. Show `pending.number` to the person. */
|
|
4
|
+
pending: PendingPushDevice | null;
|
|
5
|
+
error: string | null;
|
|
6
|
+
/** Register an Expo (or native) push token for approvals only. */
|
|
7
|
+
register(input: {
|
|
8
|
+
deviceToken: string;
|
|
9
|
+
platform: PushDevice['platform'];
|
|
10
|
+
label?: string;
|
|
11
|
+
}): Promise<boolean>;
|
|
12
|
+
/** Confirm with the number the person tapped. */
|
|
13
|
+
confirm(number: string): Promise<boolean>;
|
|
14
|
+
list(): Promise<PushDevice[]>;
|
|
15
|
+
remove(id: string): Promise<boolean>;
|
|
16
|
+
}
|
|
17
|
+
/** Controller logic, separated from React so it is testable with a fake client. */
|
|
18
|
+
export declare function createPushDeviceActions(client: FapiClient): {
|
|
19
|
+
register: (input: {
|
|
20
|
+
deviceToken: string;
|
|
21
|
+
platform: PushDevice["platform"];
|
|
22
|
+
label?: string;
|
|
23
|
+
}) => Promise<{
|
|
24
|
+
pending: PendingPushDevice | null;
|
|
25
|
+
response: import("@atlasauth/js").FapiResponse<import("@atlasauth/js").PushDeviceWire & {
|
|
26
|
+
challenge_id: string;
|
|
27
|
+
number_match: string;
|
|
28
|
+
expires_at: number;
|
|
29
|
+
}>;
|
|
30
|
+
}>;
|
|
31
|
+
confirm: (challengeId: string, number: string) => Promise<boolean>;
|
|
32
|
+
list: () => Promise<PushDevice[]>;
|
|
33
|
+
remove: (id: string) => Promise<boolean>;
|
|
34
|
+
};
|
|
35
|
+
export declare function usePushDevices(): PushDevicesController;
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.createPushDeviceActions = createPushDeviceActions;
|
|
4
|
+
exports.usePushDevices = usePushDevices;
|
|
5
|
+
/**
|
|
6
|
+
* Register this phone for "Approve in your app" pushes, without enrolling push
|
|
7
|
+
* as a second factor. A thin hook over the `@atlasauth/js` calls, bound to the
|
|
8
|
+
* provider's bearer-authenticated client.
|
|
9
|
+
*/
|
|
10
|
+
const react_1 = require("react");
|
|
11
|
+
const js_1 = require("@atlasauth/js");
|
|
12
|
+
const policies_1 = require("./policies");
|
|
13
|
+
/** Controller logic, separated from React so it is testable with a fake client. */
|
|
14
|
+
function createPushDeviceActions(client) {
|
|
15
|
+
return {
|
|
16
|
+
register: (input) => (0, js_1.registerApprovalDevice)(client, input),
|
|
17
|
+
confirm: async (challengeId, number) => (await (0, js_1.respondToPushDevice)(client, { challengeId, number })).ok,
|
|
18
|
+
list: () => (0, js_1.listPushDevices)(client),
|
|
19
|
+
remove: async (id) => (await (0, js_1.removePushDevice)(client, id)).ok,
|
|
20
|
+
};
|
|
21
|
+
}
|
|
22
|
+
function usePushDevices() {
|
|
23
|
+
const client = (0, policies_1.useExpoFapiClient)();
|
|
24
|
+
const [pending, setPending] = (0, react_1.useState)(null);
|
|
25
|
+
const [error, setError] = (0, react_1.useState)(null);
|
|
26
|
+
const actions = createPushDeviceActions(client);
|
|
27
|
+
const register = (0, react_1.useCallback)(async (input) => {
|
|
28
|
+
const { pending: next, response } = await createPushDeviceActions(client).register(input);
|
|
29
|
+
setPending(next);
|
|
30
|
+
setError(next ? null : (response.errors[0]?.message ?? 'The device could not be registered.'));
|
|
31
|
+
return next !== null;
|
|
32
|
+
}, [client]);
|
|
33
|
+
const confirm = (0, react_1.useCallback)(async (number) => {
|
|
34
|
+
if (!pending)
|
|
35
|
+
return false;
|
|
36
|
+
const ok = await createPushDeviceActions(client).confirm(pending.challengeId, number);
|
|
37
|
+
setError(ok ? null : 'The number was not accepted.');
|
|
38
|
+
if (ok)
|
|
39
|
+
setPending(null);
|
|
40
|
+
return ok;
|
|
41
|
+
}, [client, pending]);
|
|
42
|
+
return { pending, error, register, confirm, list: actions.list, remove: actions.remove };
|
|
43
|
+
}
|
|
44
|
+
//# sourceMappingURL=push-devices.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"push-devices.js","sourceRoot":"","sources":["../src/push-devices.ts"],"names":[],"mappings":";;AAsBA,0DAOC;AAED,wCAsBC;AArDD;;;;GAIG;AACH,iCAA8C;AAC9C,sCAAyK;AACzK,yCAA+C;AAc/C,mFAAmF;AACnF,SAAgB,uBAAuB,CAAC,MAAkB;IACxD,OAAO;QACL,QAAQ,EAAE,CAAC,KAAgF,EAAE,EAAE,CAAC,IAAA,2BAAsB,EAAC,MAAM,EAAE,KAAK,CAAC;QACrI,OAAO,EAAE,KAAK,EAAE,WAAmB,EAAE,MAAc,EAAE,EAAE,CAAC,CAAC,MAAM,IAAA,wBAAmB,EAAC,MAAM,EAAE,EAAE,WAAW,EAAE,MAAM,EAAE,CAAC,CAAC,CAAC,EAAE;QACvH,IAAI,EAAE,GAAG,EAAE,CAAC,IAAA,oBAAe,EAAC,MAAM,CAAC;QACnC,MAAM,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AAC,8BAA8B,CAAC,CAAC;QACrD,IAAI,EAAE;YAAE,UAAU,CAAC,IAAI,CAAC,CAAC;QACzB,OAAO,EAAE,CAAC;IACZ,CAAC,EAAE,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC,CAAC;IAEtB,OAAO,EAAE,OAAO,EAAE,KAAK,EAAE,QAAQ,EAAE,OAAO,EAAE,IAAI,EAAE,OAAO,CAAC,IAAI,EAAE,MAAM,EAAE,OAAO,CAAC,MAAM,EAAE,CAAC;AAC3F,CAAC"}
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
import type { SecuritySectionKind, SecuritySectionView, SignInScreenView } from '@atlasauth/js';
|
|
2
|
+
import { type SecuritySectionSetup, type SignInScreenSetup } from './screens';
|
|
3
|
+
/**
|
|
4
|
+
* The whole sign-in screen as a view-model: `const { view, ...actions } = useSignInScreen({ apple, google, passkey })`.
|
|
5
|
+
* Render `view.step`, `view.methods`, `view.fields`, `view.error`; call `submit`, `selectMethod`, `sendCode`,
|
|
6
|
+
* `signInWithPasskey`, `signInWithApple`, `signInWithGoogle`. Second-factor setup, recovery codes, policies and required
|
|
7
|
+
* actions are steps of the same view (`enroll_second_factor`, `recovery_codes`, `policies`, `required_action`).
|
|
8
|
+
* No fetch in your app; a completed sign-in is stored by the provider like any other.
|
|
9
|
+
*/
|
|
10
|
+
export declare function useSignInScreen(setup?: SignInScreenSetup): {
|
|
11
|
+
getView(): SignInScreenView;
|
|
12
|
+
subscribe(listener: (view: SignInScreenView) => void): () => void;
|
|
13
|
+
flow: import("@atlasauth/js").SignInFlow;
|
|
14
|
+
selectMethod(method: import("@atlasauth/js").SignInMethod): Promise<void>;
|
|
15
|
+
sendCode(): Promise<void>;
|
|
16
|
+
resend(): Promise<void>;
|
|
17
|
+
submit(values?: Record<string, string>): Promise<void>;
|
|
18
|
+
signInWithPasskey(): Promise<void>;
|
|
19
|
+
signInWithApple(): Promise<void>;
|
|
20
|
+
signInWithGoogle(): Promise<void>;
|
|
21
|
+
acknowledgeRecoveryCodes(): Promise<void>;
|
|
22
|
+
acceptPolicies(options?: {
|
|
23
|
+
only?: string[];
|
|
24
|
+
scrolledToEnd?: boolean;
|
|
25
|
+
viewMs?: number;
|
|
26
|
+
}): Promise<void>;
|
|
27
|
+
startIdentityVerification(redirectUrl?: string): Promise<void>;
|
|
28
|
+
checkIdentityVerification(): Promise<void>;
|
|
29
|
+
submitCaptcha(token: string): Promise<void>;
|
|
30
|
+
reset(): void;
|
|
31
|
+
view: SignInScreenView;
|
|
32
|
+
};
|
|
33
|
+
/**
|
|
34
|
+
* One account-security section as a view-model, step-up handled inside:
|
|
35
|
+
* `const { view, remove, startTotp, submit } = useSecuritySection('mfa', { choose })`.
|
|
36
|
+
*/
|
|
37
|
+
export declare function useSecuritySection(kind: SecuritySectionKind, setup?: SecuritySectionSetup): {
|
|
38
|
+
getView(): SecuritySectionView;
|
|
39
|
+
subscribe(listener: (view: SecuritySectionView) => void): () => void;
|
|
40
|
+
load(): Promise<void>;
|
|
41
|
+
cancel(): void;
|
|
42
|
+
remove(id: string): Promise<void>;
|
|
43
|
+
revokeOthers(): Promise<void>;
|
|
44
|
+
startTotp(): Promise<void>;
|
|
45
|
+
startSms(phone: string): Promise<void>;
|
|
46
|
+
addPhone(phone: string): Promise<void>;
|
|
47
|
+
verifyPhone(id: string): Promise<void>;
|
|
48
|
+
makePrimary(id: string): Promise<void>;
|
|
49
|
+
addPasskey(): Promise<void>;
|
|
50
|
+
regenerateCodes(): Promise<void>;
|
|
51
|
+
acknowledgeCodes(): void;
|
|
52
|
+
submit(values: Record<string, string>): Promise<void>;
|
|
53
|
+
view: SecuritySectionView;
|
|
54
|
+
};
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.useSignInScreen = useSignInScreen;
|
|
4
|
+
exports.useSecuritySection = useSecuritySection;
|
|
5
|
+
const react_1 = require("react");
|
|
6
|
+
const policies_1 = require("./policies");
|
|
7
|
+
const screens_1 = require("./screens");
|
|
8
|
+
/**
|
|
9
|
+
* The whole sign-in screen as a view-model: `const { view, ...actions } = useSignInScreen({ apple, google, passkey })`.
|
|
10
|
+
* Render `view.step`, `view.methods`, `view.fields`, `view.error`; call `submit`, `selectMethod`, `sendCode`,
|
|
11
|
+
* `signInWithPasskey`, `signInWithApple`, `signInWithGoogle`. Second-factor setup, recovery codes, policies and required
|
|
12
|
+
* actions are steps of the same view (`enroll_second_factor`, `recovery_codes`, `policies`, `required_action`).
|
|
13
|
+
* No fetch in your app; a completed sign-in is stored by the provider like any other.
|
|
14
|
+
*/
|
|
15
|
+
function useSignInScreen(setup = {}) {
|
|
16
|
+
const client = (0, policies_1.useExpoFapiClient)();
|
|
17
|
+
// Created once per client; the setup (providers, localization) is read when the client changes.
|
|
18
|
+
const screen = (0, react_1.useMemo)(() => (0, screens_1.createExpoSignInScreen)(client, setup), [client]); // eslint-disable-line react-hooks/exhaustive-deps
|
|
19
|
+
const view = (0, react_1.useSyncExternalStore)(screen.subscribe, screen.getView, screen.getView);
|
|
20
|
+
return { view, ...screen };
|
|
21
|
+
}
|
|
22
|
+
/**
|
|
23
|
+
* One account-security section as a view-model, step-up handled inside:
|
|
24
|
+
* `const { view, remove, startTotp, submit } = useSecuritySection('mfa', { choose })`.
|
|
25
|
+
*/
|
|
26
|
+
function useSecuritySection(kind, setup = {}) {
|
|
27
|
+
const client = (0, policies_1.useExpoFapiClient)();
|
|
28
|
+
// The latest callbacks without re-creating the section on every render.
|
|
29
|
+
const latest = (0, react_1.useRef)(setup);
|
|
30
|
+
latest.current = setup;
|
|
31
|
+
const section = (0, react_1.useMemo)(() => (0, screens_1.createExpoSecuritySection)(client, kind, {
|
|
32
|
+
...(setup.localization !== undefined ? { localization: setup.localization } : {}),
|
|
33
|
+
...(setup.choose ? { choose: (request) => latest.current.choose(request) } : {}),
|
|
34
|
+
...(setup.passkey?.assertion ? { passkey: { assertion: (challenge) => latest.current.passkey.assertion(challenge) } } : {}),
|
|
35
|
+
...(setup.addPasskey ? { addPasskey: (c) => latest.current.addPasskey(c) } : {}),
|
|
36
|
+
}),
|
|
37
|
+
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
38
|
+
[client, kind]);
|
|
39
|
+
const view = (0, react_1.useSyncExternalStore)(section.subscribe, section.getView, section.getView);
|
|
40
|
+
return { view, ...section };
|
|
41
|
+
}
|
|
42
|
+
//# sourceMappingURL=screens-hook.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"screens-hook.js","sourceRoot":"","sources":["../src/screens-hook.ts"],"names":[],"mappings":";;AAYA,0CAMC;AAMD,gDAkBC;AA1CD,iCAA8D;AAE9D,yCAA+C;AAC/C,uCAAiI;AAEjI;;;;;;GAMG;AACH,SAAgB,eAAe,CAAC,QAA2B,EAAE;IAC3D,MAAM,MAAM,GAAG,IAAA,4BAAiB,GAAE,CAAC;IACnC,gGAAgG;IAChG,MAAM,MAAM,GAAG,IAAA,eAAO,EAAC,GAAG,EAAE,CAAC,IAAA,gCAAsB,EAAC,MAAM,EAAE,KAAK,CAAC,EAAE,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,kDAAkD;IACjI,MAAM,IAAI,GAAqB,IAAA,4BAAoB,EAAC,MAAM,CAAC,SAAS,EAAE,MAAM,CAAC,OAAO,EAAE,MAAM,CAAC,OAAO,CAAC,CAAC;IACtG,OAAO,EAAE,IAAI,EAAE,GAAG,MAAM,EAAE,CAAC;AAC7B,CAAC;AAED;;;GAGG;AACH,SAAgB,kBAAkB,CAAC,IAAyB,EAAE,QAA8B,EAAE;IAC5F,MAAM,MAAM,GAAG,IAAA,4BAAiB,GAAE,CAAC;IACnC,wEAAwE;IACxE,MAAM,MAAM,GAAG,IAAA,cAAM,EAAC,KAAK,CAAC,CAAC;IAC7B,MAAM,CAAC,OAAO,GAAG,KAAK,CAAC;IACvB,MAAM,OAAO,GAAG,IAAA,eAAO,EACrB,GAAG,EAAE,CACH,IAAA,mCAAyB,EAAC,MAAM,EAAE,IAAI,EAAE;QACtC,GAAG,CAAC,KAAK,CAAC,YAAY,KAAK,SAAS,CAAC,CAAC,CAAC,EAAE,YAAY,EAAE,KAAK,CAAC,YAAY,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;QACjF,GAAG,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,MAAM,EAAE,CAAC,OAAO,EAAE,EAAE,CAAC,MAAM,CAAC,OAAO,CAAC,MAAO,CAAC,OAAO,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;QACjF,GAAG,CAAC,KAAK,CAAC,OAAO,EAAE,SAAS,CAAC,CAAC,CAAC,EAAE,OAAO,EAAE,EAAE,SAAS,EAAE,CAAC,SAAS,EAAE,EAAE,CAAC,MAAM,CAAC,OAAO,CAAC,OAAQ,CAAC,SAAU,CAAC,SAAS,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;QAC7H,GAAG,CAAC,KAAK,CAAC,UAAU,CAAC,CAAC,CAAC,EAAE,UAAU,EAAE,CAAC,CAAC,EAAE,EAAE,CAAC,MAAM,CAAC,OAAO,CAAC,UAAW,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;KAClF,CAAC;IACJ,uDAAuD;IACvD,CAAC,MAAM,EAAE,IAAI,CAAC,CACf,CAAC;IACF,MAAM,IAAI,GAAwB,IAAA,4BAAoB,EAAC,OAAO,CAAC,SAAS,EAAE,OAAO,CAAC,OAAO,EAAE,OAAO,CAAC,OAAO,CAAC,CAAC;IAC5G,OAAO,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC;AAC9B,CAAC"}
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* View-models for native sign-in and account-security screens, bound to the provider's bearer-authenticated client.
|
|
3
|
+
* No React in this file (so it is testable in Node); the hooks are in `./screens-hook`.
|
|
4
|
+
*
|
|
5
|
+
* Optional native pieces are passed in, never imported: Apple and Google sheets, a passkey provider from
|
|
6
|
+
* `@atlasauth/expo-passkeys` (`{ signIn: nativePasskeySignIn(Passkey), assertion: nativePasskeyAssertion(Passkey) }`).
|
|
7
|
+
* Whatever you leave out is simply not offered.
|
|
8
|
+
*/
|
|
9
|
+
import { type ErrorStrings, type FapiClient, type FieldError, type NativeSignInProvider, type PasskeyAssertionProvider, type SecuritySectionKind, type StepUpFlowOptions } from '@atlasauth/js';
|
|
10
|
+
import { type AppleAuthenticationLike, type GoogleSigninLike } from './social';
|
|
11
|
+
export type { ScreenField, SectionField, SecurityItem, SecuritySection, SecuritySectionKind, SecuritySectionStep, SecuritySectionView, SignInMethod, SignInScreen, SignInScreenStep, SignInScreenView, } from '@atlasauth/js';
|
|
12
|
+
/** A passkey provider for a phone: `@atlasauth/expo-passkeys`'s `nativePasskeySignIn(Passkey)` and `nativePasskeyAssertion(Passkey)`. */
|
|
13
|
+
export interface NativePasskeyProvider {
|
|
14
|
+
/** Passkey sign-in (the one-tap button). */
|
|
15
|
+
signIn?: NativeSignInProvider;
|
|
16
|
+
/** The passkey second factor, and the passkey re-authentication of a step-up. */
|
|
17
|
+
assertion?: PasskeyAssertionProvider;
|
|
18
|
+
}
|
|
19
|
+
export interface SignInScreenSetup {
|
|
20
|
+
localization?: ErrorStrings | null;
|
|
21
|
+
/** `expo-apple-authentication`; offers the Apple button. */
|
|
22
|
+
apple?: AppleAuthenticationLike;
|
|
23
|
+
/** `@react-native-google-signin/google-signin`; offers the Google button. */
|
|
24
|
+
google?: GoogleSigninLike;
|
|
25
|
+
passkey?: NativePasskeyProvider;
|
|
26
|
+
}
|
|
27
|
+
/** The sign-in screen model on a client; separated from React so it is testable with a fake one. */
|
|
28
|
+
export declare function createExpoSignInScreen(client: FapiClient, setup?: SignInScreenSetup): import("@atlasauth/js").SignInScreen;
|
|
29
|
+
export interface SecuritySectionSetup {
|
|
30
|
+
localization?: ErrorStrings | null;
|
|
31
|
+
/** Asks the person to re-authenticate when the server requires it (see `useStepUp`). Without it the view says `stepUpRequired`. */
|
|
32
|
+
choose?: StepUpFlowOptions['choose'];
|
|
33
|
+
passkey?: NativePasskeyProvider;
|
|
34
|
+
/** Registers a passkey on this device (`registerPasskey` from `@atlasauth/expo-passkeys`); offers `add_passkey`. */
|
|
35
|
+
addPasskey?: (client: FapiClient) => Promise<{
|
|
36
|
+
ok: boolean;
|
|
37
|
+
errors: FieldError[];
|
|
38
|
+
}>;
|
|
39
|
+
}
|
|
40
|
+
/** One security section model on a client; separated from React so it is testable with a fake one. */
|
|
41
|
+
export declare function createExpoSecuritySection(client: FapiClient, kind: SecuritySectionKind, setup?: SecuritySectionSetup): import("@atlasauth/js").SecuritySection;
|
package/dist/screens.js
ADDED
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.createExpoSignInScreen = createExpoSignInScreen;
|
|
4
|
+
exports.createExpoSecuritySection = createExpoSecuritySection;
|
|
5
|
+
/**
|
|
6
|
+
* View-models for native sign-in and account-security screens, bound to the provider's bearer-authenticated client.
|
|
7
|
+
* No React in this file (so it is testable in Node); the hooks are in `./screens-hook`.
|
|
8
|
+
*
|
|
9
|
+
* Optional native pieces are passed in, never imported: Apple and Google sheets, a passkey provider from
|
|
10
|
+
* `@atlasauth/expo-passkeys` (`{ signIn: nativePasskeySignIn(Passkey), assertion: nativePasskeyAssertion(Passkey) }`).
|
|
11
|
+
* Whatever you leave out is simply not offered.
|
|
12
|
+
*/
|
|
13
|
+
const js_1 = require("@atlasauth/js");
|
|
14
|
+
const social_1 = require("./social");
|
|
15
|
+
/** The sign-in screen model on a client; separated from React so it is testable with a fake one. */
|
|
16
|
+
function createExpoSignInScreen(client, setup = {}) {
|
|
17
|
+
return (0, js_1.createSignInScreen)({
|
|
18
|
+
client,
|
|
19
|
+
...(setup.localization !== undefined ? { localization: setup.localization } : {}),
|
|
20
|
+
...(setup.passkey?.assertion ? { passkeyAssertion: setup.passkey.assertion } : {}),
|
|
21
|
+
nativeSignIn: {
|
|
22
|
+
...(setup.passkey?.signIn ? { passkey: setup.passkey.signIn } : {}),
|
|
23
|
+
...(setup.apple ? { apple: (0, social_1.appleSignInProvider)(setup.apple) } : {}),
|
|
24
|
+
...(setup.google ? { google: (0, social_1.googleSignInProvider)(setup.google) } : {}),
|
|
25
|
+
},
|
|
26
|
+
});
|
|
27
|
+
}
|
|
28
|
+
/** One security section model on a client; separated from React so it is testable with a fake one. */
|
|
29
|
+
function createExpoSecuritySection(client, kind, setup = {}) {
|
|
30
|
+
return (0, js_1.createSecuritySection)({
|
|
31
|
+
client,
|
|
32
|
+
kind,
|
|
33
|
+
...(setup.localization !== undefined ? { localization: setup.localization } : {}),
|
|
34
|
+
...(setup.choose ? { choose: setup.choose } : {}),
|
|
35
|
+
...(setup.passkey?.assertion ? { passkeyAssertion: setup.passkey.assertion } : {}),
|
|
36
|
+
...(setup.addPasskey ? { addPasskey: setup.addPasskey } : {}),
|
|
37
|
+
});
|
|
38
|
+
}
|
|
39
|
+
//# sourceMappingURL=screens.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"screens.js","sourceRoot":"","sources":["../src/screens.ts"],"names":[],"mappings":";;AAqDA,wDAWC;AAYD,8DASC;AArFD;;;;;;;GAOG;AACH,sCAUuB;AACvB,qCAA0H;AAiC1H,oGAAoG;AACpG,SAAgB,sBAAsB,CAAC,MAAkB,EAAE,QAA2B,EAAE;IACtF,OAAO,IAAA,uBAAkB,EAAC;QACxB,MAAM;QACN,GAAG,CAAC,KAAK,CAAC,YAAY,KAAK,SAAS,CAAC,CAAC,CAAC,EAAE,YAAY,EAAE,KAAK,CAAC,YAAY,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;QACjF,GAAG,CAAC,KAAK,CAAC,OAAO,EAAE,SAAS,CAAC,CAAC,CAAC,EAAE,gBAAgB,EAAE,KAAK,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CAAC,EAAE,CAAC;KAC9D,CAAC,CAAC;AACL,CAAC"}
|
package/dist/social.d.ts
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
* /v1/client/sign_ins/id_token`) and traded for a session. The provider's token
|
|
5
5
|
* cache stores the returned session JWT.
|
|
6
6
|
*/
|
|
7
|
-
import { type FapiClient, type FieldError, type LinkExternalAccountResult } from '@atlasauth/js';
|
|
7
|
+
import { type FapiClient, type FieldError, type LinkExternalAccountResult, type NativeSignInProvider } from '@atlasauth/js';
|
|
8
8
|
export interface NativeSocialResult {
|
|
9
9
|
status: 'complete' | 'needs_more' | 'error' | 'cancelled';
|
|
10
10
|
jwt?: string;
|
|
@@ -49,3 +49,10 @@ export interface GoogleSigninLike {
|
|
|
49
49
|
}
|
|
50
50
|
/** Sign in with the Google system sheet (use `@atlasauth/expo-google-signin` for Play Services checks). */
|
|
51
51
|
export declare function signInWithGoogle(client: FapiClient, google: GoogleSigninLike): Promise<NativeSocialResult>;
|
|
52
|
+
/**
|
|
53
|
+
* The Apple sheet as a `nativeSignIn.apple` provider for `createSignInFlow` / `useSignInScreen`: the nonce, the sheet,
|
|
54
|
+
* then the id token, returned as the flow's own state so a second factor or policy continues in the same flow.
|
|
55
|
+
*/
|
|
56
|
+
export declare function appleSignInProvider(apple: AppleAuthenticationLike): NativeSignInProvider;
|
|
57
|
+
/** The Google sheet as a `nativeSignIn.google` provider; see {@link appleSignInProvider}. */
|
|
58
|
+
export declare function googleSignInProvider(google: GoogleSigninLike): NativeSignInProvider;
|
package/dist/social.js
CHANGED
|
@@ -4,6 +4,8 @@ exports.signInWithIdToken = signInWithIdToken;
|
|
|
4
4
|
exports.linkWithIdToken = linkWithIdToken;
|
|
5
5
|
exports.signInWithApple = signInWithApple;
|
|
6
6
|
exports.signInWithGoogle = signInWithGoogle;
|
|
7
|
+
exports.appleSignInProvider = appleSignInProvider;
|
|
8
|
+
exports.googleSignInProvider = googleSignInProvider;
|
|
7
9
|
/**
|
|
8
10
|
* Native Google / Apple sign-in for the provider's client: the system sheet
|
|
9
11
|
* yields a provider ID token, which is sent to Atlas (`POST
|
|
@@ -65,4 +67,43 @@ async function signInWithGoogle(client, google) {
|
|
|
65
67
|
return { status: 'cancelled', errors: [] };
|
|
66
68
|
return signInWithIdToken(client, { provider: 'google', idToken, nonce });
|
|
67
69
|
}
|
|
70
|
+
const nativeFlow = (errors) => ({ attempt: null, errors, busy: false, pollSecret: null, ticket: null });
|
|
71
|
+
const cancelled = () => nativeFlow([{ code: 'NATIVE_CANCELLED', reason: 'native_cancelled', message: 'The sign-in was cancelled.' }]);
|
|
72
|
+
/**
|
|
73
|
+
* The Apple sheet as a `nativeSignIn.apple` provider for `createSignInFlow` / `useSignInScreen`: the nonce, the sheet,
|
|
74
|
+
* then the id token, returned as the flow's own state so a second factor or policy continues in the same flow.
|
|
75
|
+
*/
|
|
76
|
+
function appleSignInProvider(apple) {
|
|
77
|
+
return async (client) => {
|
|
78
|
+
const nonce = (await (0, js_1.mintNativeNonce)(client, 'apple')) ?? undefined;
|
|
79
|
+
if (!nonce)
|
|
80
|
+
return nativeFlow([{ code: 'NONCE', message: 'Could not start Apple sign-in.' }]);
|
|
81
|
+
let idToken;
|
|
82
|
+
try {
|
|
83
|
+
({ identityToken: idToken } = await apple.signInAsync({ requestedScopes: [apple.AppleAuthenticationScope.EMAIL, apple.AppleAuthenticationScope.FULL_NAME], nonce }));
|
|
84
|
+
}
|
|
85
|
+
catch {
|
|
86
|
+
return cancelled();
|
|
87
|
+
}
|
|
88
|
+
return idToken ? (0, js_1.nativeSignIn)(client, { provider: 'apple', idToken, nonce }) : cancelled();
|
|
89
|
+
};
|
|
90
|
+
}
|
|
91
|
+
/** The Google sheet as a `nativeSignIn.google` provider; see {@link appleSignInProvider}. */
|
|
92
|
+
function googleSignInProvider(google) {
|
|
93
|
+
return async (client) => {
|
|
94
|
+
const nonce = (await (0, js_1.mintNativeNonce)(client, 'google')) ?? undefined;
|
|
95
|
+
if (!nonce)
|
|
96
|
+
return nativeFlow([{ code: 'NONCE', message: 'Could not start Google sign-in.' }]);
|
|
97
|
+
let response;
|
|
98
|
+
try {
|
|
99
|
+
response = await google.signIn({ nonce });
|
|
100
|
+
}
|
|
101
|
+
catch {
|
|
102
|
+
return cancelled();
|
|
103
|
+
}
|
|
104
|
+
const r = response;
|
|
105
|
+
const idToken = r?.data?.idToken ?? r?.idToken;
|
|
106
|
+
return idToken ? (0, js_1.nativeSignIn)(client, { provider: 'google', idToken, nonce }) : cancelled();
|
|
107
|
+
};
|
|
108
|
+
}
|
|
68
109
|
//# sourceMappingURL=social.js.map
|
package/dist/social.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"social.js","sourceRoot":"","sources":["../src/social.ts"],"names":[],"mappings":";;AAgBA,8CAQC;AAMD,0CAEC;AASD,0CAWC;AAQD,4CAaC;
|
|
1
|
+
{"version":3,"file":"social.js","sourceRoot":"","sources":["../src/social.ts"],"names":[],"mappings":";;AAgBA,8CAQC;AAMD,0CAEC;AASD,0CAWC;AAQD,4CAaC;AASD,kDAYC;AAGD,oDAcC;AA/GD;;;;;GAKG;AACH,sCAA2M;AAS3M,2FAA2F;AACpF,KAAK,UAAU,iBAAiB,CAAC,MAAkB,EAAE,KAA4D;IACtH,MAAM,IAAI,GAAG,MAAM,IAAA,iBAAY,EAAC,MAAM,EAAE,KAAK,CAAC,CAAC;IAC/C,IAAI,IAAI,CAAC,MAAM,CAAC,MAAM;QAAE,OAAO,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,EAAE,IAAI,CAAC,MAAM,EAAE,CAAC;IACxE,MAAM,OAAO,GAAG,IAAI,CAAC,OAAiC,CAAC;IACvD,IAAI,CAAC,IAAI,CAAC,MAAM;QAAE,OAAO,EAAE,MAAM,EAAE,YAAY,EAAE,GAAG,CAAC,OAAO,EAAE,EAAE,CAAC,CAAC,CAAC,EAAE,SAAS,EAAE,OAAO,CAAC,EAAE,EAAE,CAAC,CAAC,CA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main": "./dist/index.js",
|
|
5
5
|
"types": "./dist/index.d.ts",
|
|
6
6
|
"exports": {
|
|
@@ -29,7 +29,7 @@
|
|
|
29
29
|
"@atlasauth/react-native": "^0.8.0"
|
|
30
30
|
},
|
|
31
31
|
"peerDependencies": {
|
|
32
|
-
"@atlasauth/js": ">=0.
|
|
32
|
+
"@atlasauth/js": ">=0.44.0 <1.0.0",
|
|
33
33
|
"react": ">=18",
|
|
34
34
|
"react-native": ">=0.73",
|
|
35
35
|
"expo-secure-store": ">=12",
|
|
@@ -58,7 +58,7 @@
|
|
|
58
58
|
"react": "^18.3.1",
|
|
59
59
|
"typescript": "^5.6.3",
|
|
60
60
|
"vitest": "^3.2.7",
|
|
61
|
-
"@atlasauth/js": "0.
|
|
61
|
+
"@atlasauth/js": "0.44.0"
|
|
62
62
|
},
|
|
63
63
|
"publishConfig": {
|
|
64
64
|
"access": "public"
|