@alore/auth-react-ui 1.1.1-alpha → 1.1.1-alpha.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.
@@ -9,9 +9,10 @@ export interface AuthProps {
9
9
  };
10
10
  inviteToken?: string;
11
11
  keyshareWorker?: Worker | null;
12
- onSuccess?: (_sessionUser: SessionUser) => void;
12
+ onLogin?: (_sessionUser: SessionUser) => void;
13
+ onRegister?: (_sessionUser: SessionUser) => void;
13
14
  onError?: (_error: string) => void;
14
15
  onGoBack?: () => void;
15
16
  }
16
- declare const Auth: ({ googleId, forgeId, styles, inviteToken, keyshareWorker, onSuccess, onError, onGoBack, }: AuthProps) => React.JSX.Element | null;
17
+ declare const Auth: ({ googleId, forgeId, styles, inviteToken, keyshareWorker, onLogin, onRegister, onError, onGoBack, }: AuthProps) => React.JSX.Element | null;
17
18
  export default Auth;
@@ -39,7 +39,7 @@ const Register_1 = __importDefault(require("../auth/Register"));
39
39
  const helpers_1 = require("../helpers");
40
40
  const useAuthServiceInstance_1 = __importDefault(require("../hooks/useAuthServiceInstance"));
41
41
  const themes_1 = require("../styles/themes");
42
- const Auth = ({ googleId, forgeId, styles, inviteToken, keyshareWorker, onSuccess,
42
+ const Auth = ({ googleId, forgeId, styles, inviteToken, keyshareWorker, onLogin, onRegister,
43
43
  // eslint-disable-next-line no-unused-vars
44
44
  onError, onGoBack, }) => {
45
45
  const authServiceInstance = (0, useAuthServiceInstance_1.default)();
@@ -82,10 +82,11 @@ onError, onGoBack, }) => {
82
82
  }
83
83
  }, [socialProviderRegisterUser]);
84
84
  (0, react_2.useEffect)(() => {
85
- if ((authState.matches('active.login.successfulLogin') ||
86
- authState.matches('active.register.userCreated')) &&
87
- sessionUser) {
88
- onSuccess === null || onSuccess === void 0 ? void 0 : onSuccess(sessionUser);
85
+ if (authState.matches('active.login.successfulLogin') && sessionUser) {
86
+ onLogin === null || onLogin === void 0 ? void 0 : onLogin(sessionUser);
87
+ }
88
+ if (authState.matches('active.register.userCreated') && sessionUser) {
89
+ onRegister === null || onRegister === void 0 ? void 0 : onRegister(sessionUser);
89
90
  }
90
91
  }, [sessionUser]);
91
92
  (0, react_2.useEffect)(() => {
@@ -1 +1 @@
1
- {"version":3,"file":"Auth.js","sourceRoot":"","sources":["../../../src/components/Auth.tsx"],"names":[],"mappings":";AAAA,YAAY,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAEb,0DAAyE;AACzE,sDAA8D;AAC9D,kDAAiD;AACjD,gDAA0D;AAC1D,yCAAyC;AACzC,mDAAqE;AACrE,+CAAsE;AAEtE,0DAAkC;AAClC,gEAAwC;AACxC,wCAA4C;AAC5C,6FAAqE;AAErE,6CAA8E;AAgB9E,MAAM,IAAI,GAAG,CAAC,EACZ,QAAQ,EACR,OAAO,EACP,MAAM,EACN,WAAW,EACX,cAAc,EACd,SAAS;AACT,0CAA0C;AAC1C,OAAO,EACP,QAAQ,GACE,EAAE,EAAE;IACd,MAAM,mBAAmB,GAAG,IAAA,gCAAsB,GAAE,CAAC;IACrD,MAAM,CAAC,SAAS,EAAE,QAAQ,CAAC,GAAG,IAAA,gBAAQ,EAAC,mBAAmB,CAAC,CAAC;IAC5D,MAAM,EAAE,UAAU,EAAE,WAAW,EAAE,mBAAmB,EAAE,0BAA0B,EAAE,GAChF,SAAS,CAAC,OAAO,CAAC;IACpB,MAAM,EAAE,MAAM,EAAE,GAAG,mBAAmB,IAAI,EAAE,CAAC;IAE7C,MAAM,CAAC,QAAQ,EAAE,WAAW,CAAC,GAAG,IAAA,gBAAQ,EAAC,KAAK,CAAC,CAAC;IAEhD,MAAM,UAAU,GAAG;QACjB,IAAI,EAAE;YACJ,QAAQ,EAAE,OAAO,CAAC,GAAG,CAAC,wBAAwB,IAAI,EAAE;YACpD,SAAS,EAAE,0CAA0C;SACtD;KACF,CAAC;IAEF,MAAM,YAAY,GAAG,IAAI,sCAAuB,CAAC,UAAU,CAAC,CAAC;IAE7D,MAAM,YAA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AC,SAAS,EAAC,oCAAoC,GAAG,CACtD;wBAGP,SAAS,CAAC,OAAO,CAAC,cAAc,CAAC,IAAI,CACpC,8BAAC,eAAK,IACJ,MAAM,EAAE,MAAM,EACd,mBAAmB,EAAE,mBAAmB,EACxC,OAAO,EAAE,OAAO,EAChB,WAAW,EAAE,WAAW,EACxB,cAAc,EAAE,cAAc,EAC9B,SAAS,EAAE,MAAM,aAAN,MAAM,uBAAN,MAAM,CAAE,SAAS,GAC5B,CACH;wBACA,SAAS,CAAC,OAAO,CAAC,iBAAiB,CAAC,IAAI,CACvC,8BAAC,kBAAQ,IACP,MAAM,EAAE,MAAM,EACd,mBAAmB,EAAE,mBAAmB,EACxC,OAAO,EAAE,OAAO,EAChB,WAAW,EAAE,WAAW,EACxB,WAAW,EAAE,WAAW,EACxB,cAAc,EAAE,cAAc,EAC9B,SAAS,EAAE,MAAM,aAAN,MAAM,uBAAN,MAAM,CAAE,SAAS,GAC5B,CACH,CACQ,CACG,CACH,CACK,CAClB,CACP,CAAC,CAAC,CAAC,IAAI,CAAC;AACX,CAAC,CAAC;AAEF,kBAAe,IAAI,CAAC"}
@@ -245,7 +245,7 @@ export declare const AuthContext: React.Context<import("xstate").Interpreter<imp
245
245
  }, {
246
246
  value: any;
247
247
  context: import("../machine/types").AuthMachineContext;
248
- }, import("xstate").MarkAllImplementationsAsProvided<import("xstate").ResolveTypegenMeta<import("../machine/index.typegen").Typegen0, {
248
+ }, import("xstate").MarkAllImplementationsAsProvided<import("xstate").ResolveTypegenMeta<any, {
249
249
  type: "INITIALIZE";
250
250
  forgeId?: string | null | undefined;
251
251
  } | {
@@ -243,7 +243,7 @@ declare const useAuthService: () => readonly [import("xstate").State<import("../
243
243
  }, any, {
244
244
  value: any;
245
245
  context: import("../machine/types").AuthMachineContext;
246
- }, import("xstate").MarkAllImplementationsAsProvided<import("xstate").ResolveTypegenMeta<import("../machine/index.typegen").Typegen0, {
246
+ }, import("xstate").MarkAllImplementationsAsProvided<import("xstate").ResolveTypegenMeta<any, {
247
247
  type: "INITIALIZE";
248
248
  forgeId?: string | null | undefined;
249
249
  } | {
@@ -1214,7 +1214,7 @@ declare const useAuthService: () => readonly [import("xstate").State<import("../
1214
1214
  }, any, {
1215
1215
  value: any;
1216
1216
  context: import("../machine/types").AuthMachineContext;
1217
- }, import("xstate").MarkAllImplementationsAsProvided<import("xstate").ResolveTypegenMeta<import("../machine/index.typegen").Typegen0, {
1217
+ }, import("xstate").MarkAllImplementationsAsProvided<import("xstate").ResolveTypegenMeta<any, {
1218
1218
  type: "INITIALIZE";
1219
1219
  forgeId?: string | null | undefined;
1220
1220
  } | {
@@ -243,7 +243,7 @@ declare const useAuthServiceInstance: () => import("xstate").Interpreter<import(
243
243
  }, {
244
244
  value: any;
245
245
  context: import("../machine/types").AuthMachineContext;
246
- }, import("xstate").MarkAllImplementationsAsProvided<import("xstate").ResolveTypegenMeta<import("../machine/index.typegen").Typegen0, {
246
+ }, import("xstate").MarkAllImplementationsAsProvided<import("xstate").ResolveTypegenMeta<any, {
247
247
  type: "INITIALIZE";
248
248
  forgeId?: string | null | undefined;
249
249
  } | {
@@ -1,9 +1,10 @@
1
1
  import { AuthProviderConfig } from '@alore/auth-react-sdk/dist/types';
2
+ import Login from './auth/Login';
3
+ import Register from './auth/Register';
2
4
  import Auth, { AuthProps } from './components/Auth';
3
5
  import { AuthProvider } from './components/AuthProvider';
4
6
  import useAuthService from './hooks/useAuthService';
5
7
  import { LocalStorageAuthState } from './machine/LocalStorageAuthState';
6
8
  import { SessionUser } from './machine/types';
7
9
  export type { AuthProps, SessionUser, AuthProviderConfig, LocalStorageAuthState };
8
- export { useAuthService, AuthProvider };
9
- export default Auth;
10
+ export { useAuthService, AuthProvider, Auth, Login, Register };
package/dist/cjs/index.js CHANGED
@@ -3,11 +3,15 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
3
3
  return (mod && mod.__esModule) ? mod : { "default": mod };
4
4
  };
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
- exports.AuthProvider = exports.useAuthService = void 0;
6
+ exports.Register = exports.Login = exports.Auth = exports.AuthProvider = exports.useAuthService = void 0;
7
+ const Login_1 = __importDefault(require("./auth/Login"));
8
+ exports.Login = Login_1.default;
9
+ const Register_1 = __importDefault(require("./auth/Register"));
10
+ exports.Register = Register_1.default;
7
11
  const Auth_1 = __importDefault(require("./components/Auth"));
12
+ exports.Auth = Auth_1.default;
8
13
  const AuthProvider_1 = require("./components/AuthProvider");
9
14
  Object.defineProperty(exports, "AuthProvider", { enumerable: true, get: function () { return AuthProvider_1.AuthProvider; } });
10
15
  const useAuthService_1 = __importDefault(require("./hooks/useAuthService"));
11
16
  exports.useAuthService = useAuthService_1.default;
12
- exports.default = Auth_1.default;
13
17
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.tsx"],"names":[],"mappings":";;;;;;AAEA,6DAAoD;AACpD,4DAAyD;AAMhC,6FANhB,2BAAY,OAMgB;AALrC,4EAAoD;AAK3C,yBALF,wBAAc,CAKE;AACvB,kBAAe,cAAI,CAAC"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.tsx"],"names":[],"mappings":";;;;;;AAEA,yDAAiC;AASY,gBATtC,eAAK,CASsC;AARlD,+DAAuC;AAQa,mBAR7C,kBAAQ,CAQ6C;AAP5D,6DAAoD;AAOb,eAPhC,cAAI,CAOgC;AAN3C,4DAAyD;AAMhC,6FANhB,2BAAY,OAMgB;AALrC,4EAAoD;AAK3C,yBALF,wBAAc,CAKE"}
@@ -244,7 +244,7 @@ export declare const authMachine: import("xstate").StateMachine<AuthMachineConte
244
244
  }, {
245
245
  value: any;
246
246
  context: AuthMachineContext;
247
- }, import("xstate").BaseActionObject, AuthMachineServices, import("xstate").ResolveTypegenMeta<import("./index.typegen").Typegen0, {
247
+ }, import("xstate").BaseActionObject, AuthMachineServices, import("xstate").ResolveTypegenMeta<any, {
248
248
  type: "INITIALIZE";
249
249
  forgeId?: string | null | undefined;
250
250
  } | {
@@ -732,7 +732,7 @@ export declare const authService: (services: {}, context: AuthMachineContext) =>
732
732
  }, {
733
733
  value: any;
734
734
  context: AuthMachineContext;
735
- }, import("xstate").MarkAllImplementationsAsProvided<import("xstate").ResolveTypegenMeta<import("./index.typegen").Typegen0, {
735
+ }, import("xstate").MarkAllImplementationsAsProvided<import("xstate").ResolveTypegenMeta<any, {
736
736
  type: "INITIALIZE";
737
737
  forgeId?: string | null | undefined;
738
738
  } | {
@@ -9,9 +9,10 @@ export interface AuthProps {
9
9
  };
10
10
  inviteToken?: string;
11
11
  keyshareWorker?: Worker | null;
12
- onSuccess?: (_sessionUser: SessionUser) => void;
12
+ onLogin?: (_sessionUser: SessionUser) => void;
13
+ onRegister?: (_sessionUser: SessionUser) => void;
13
14
  onError?: (_error: string) => void;
14
15
  onGoBack?: () => void;
15
16
  }
16
- declare const Auth: ({ googleId, forgeId, styles, inviteToken, keyshareWorker, onSuccess, onError, onGoBack, }: AuthProps) => React.JSX.Element | null;
17
+ declare const Auth: ({ googleId, forgeId, styles, inviteToken, keyshareWorker, onLogin, onRegister, onError, onGoBack, }: AuthProps) => React.JSX.Element | null;
17
18
  export default Auth;
@@ -11,7 +11,7 @@ import Register from '../auth/Register';
11
11
  import { darkenHexColor } from '../helpers';
12
12
  import useAuthServiceInstance from '../hooks/useAuthServiceInstance';
13
13
  import { buttonTheme, checkboxTheme, textInputTheme } from '../styles/themes';
14
- const Auth = ({ googleId, forgeId, styles, inviteToken, keyshareWorker, onSuccess,
14
+ const Auth = ({ googleId, forgeId, styles, inviteToken, keyshareWorker, onLogin, onRegister,
15
15
  // eslint-disable-next-line no-unused-vars
16
16
  onError, onGoBack, }) => {
17
17
  const authServiceInstance = useAuthServiceInstance();
@@ -54,10 +54,11 @@ onError, onGoBack, }) => {
54
54
  }
55
55
  }, [socialProviderRegisterUser]);
56
56
  useEffect(() => {
57
- if ((authState.matches('active.login.successfulLogin') ||
58
- authState.matches('active.register.userCreated')) &&
59
- sessionUser) {
60
- onSuccess?.(sessionUser);
57
+ if (authState.matches('active.login.successfulLogin') && sessionUser) {
58
+ onLogin?.(sessionUser);
59
+ }
60
+ if (authState.matches('active.register.userCreated') && sessionUser) {
61
+ onRegister?.(sessionUser);
61
62
  }
62
63
  }, [sessionUser]);
63
64
  useEffect(() => {
@@ -1 +1 @@
1
- {"version":3,"file":"Auth.js","sourceRoot":"","sources":["../../../src/components/Auth.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAC;AAEb,OAAO,EAAE,kBAAkB,EAAE,YAAY,EAAE,MAAM,uBAAuB,CAAC;AACzE,OAAO,EAAE,uBAAuB,EAAE,MAAM,qBAAqB,CAAC;AAC9D,OAAO,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AACjD,OAAO,EAAE,mBAAmB,EAAE,MAAM,qBAAqB,CAAC;AAC1D,OAAO,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AACzC,OAAO,EAAE,WAAW,EAAE,OAAO,EAAE,aAAa,EAAE,MAAM,gBAAgB,CAAC;AACrE,OAAO,KAAK,EAAE,EAAE,QAAQ,EAAE,SAAS,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAEtE,OAAO,KAAK,MAAM,eAAe,CAAC;AAClC,OAAO,QAAQ,MAAM,kBAAkB,CAAC;AACxC,OAAO,EAAE,cAAc,EAAE,MAAM,YAAY,CAAC;AAC5C,OAAO,sBAAsB,MAAM,iCAAiC,CAAC;AAErE,OAAO,EAAE,WAAW,EAAE,aAAa,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAgB9E,MAAM,IAAI,GAAG,CAAC,EACZ,QAAQ,EACR,OAAO,EACP,MAAM,EACN,WAAW,EACX,cAAc,EACd,SAAS;AACT,0CAA0C;AAC1C,OAAO,EACP,QAAQ,GACE,EAAE,EAAE;IACd,MAAM,mBAAmB,GAAG,sBAAsB,EAAE,CAAC;IACrD,MAAM,CA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AAI,CAAC"}
@@ -245,7 +245,7 @@ export declare const AuthContext: React.Context<import("xstate").Interpreter<imp
245
245
  }, {
246
246
  value: any;
247
247
  context: import("../machine/types").AuthMachineContext;
248
- }, import("xstate").MarkAllImplementationsAsProvided<import("xstate").ResolveTypegenMeta<import("../machine/index.typegen").Typegen0, {
248
+ }, import("xstate").MarkAllImplementationsAsProvided<import("xstate").ResolveTypegenMeta<any, {
249
249
  type: "INITIALIZE";
250
250
  forgeId?: string | null | undefined;
251
251
  } | {
@@ -243,7 +243,7 @@ declare const useAuthService: () => readonly [import("xstate").State<import("../
243
243
  }, any, {
244
244
  value: any;
245
245
  context: import("../machine/types").AuthMachineContext;
246
- }, import("xstate").MarkAllImplementationsAsProvided<import("xstate").ResolveTypegenMeta<import("../machine/index.typegen").Typegen0, {
246
+ }, import("xstate").MarkAllImplementationsAsProvided<import("xstate").ResolveTypegenMeta<any, {
247
247
  type: "INITIALIZE";
248
248
  forgeId?: string | null | undefined;
249
249
  } | {
@@ -1214,7 +1214,7 @@ declare const useAuthService: () => readonly [import("xstate").State<import("../
1214
1214
  }, any, {
1215
1215
  value: any;
1216
1216
  context: import("../machine/types").AuthMachineContext;
1217
- }, import("xstate").MarkAllImplementationsAsProvided<import("xstate").ResolveTypegenMeta<import("../machine/index.typegen").Typegen0, {
1217
+ }, import("xstate").MarkAllImplementationsAsProvided<import("xstate").ResolveTypegenMeta<any, {
1218
1218
  type: "INITIALIZE";
1219
1219
  forgeId?: string | null | undefined;
1220
1220
  } | {
@@ -243,7 +243,7 @@ declare const useAuthServiceInstance: () => import("xstate").Interpreter<import(
243
243
  }, {
244
244
  value: any;
245
245
  context: import("../machine/types").AuthMachineContext;
246
- }, import("xstate").MarkAllImplementationsAsProvided<import("xstate").ResolveTypegenMeta<import("../machine/index.typegen").Typegen0, {
246
+ }, import("xstate").MarkAllImplementationsAsProvided<import("xstate").ResolveTypegenMeta<any, {
247
247
  type: "INITIALIZE";
248
248
  forgeId?: string | null | undefined;
249
249
  } | {
@@ -1,9 +1,10 @@
1
1
  import { AuthProviderConfig } from '@alore/auth-react-sdk/dist/types';
2
+ import Login from './auth/Login';
3
+ import Register from './auth/Register';
2
4
  import Auth, { AuthProps } from './components/Auth';
3
5
  import { AuthProvider } from './components/AuthProvider';
4
6
  import useAuthService from './hooks/useAuthService';
5
7
  import { LocalStorageAuthState } from './machine/LocalStorageAuthState';
6
8
  import { SessionUser } from './machine/types';
7
9
  export type { AuthProps, SessionUser, AuthProviderConfig, LocalStorageAuthState };
8
- export { useAuthService, AuthProvider };
9
- export default Auth;
10
+ export { useAuthService, AuthProvider, Auth, Login, Register };
package/dist/mjs/index.js CHANGED
@@ -1,6 +1,7 @@
1
+ import Login from './auth/Login';
2
+ import Register from './auth/Register';
1
3
  import Auth from './components/Auth';
2
4
  import { AuthProvider } from './components/AuthProvider';
3
5
  import useAuthService from './hooks/useAuthService';
4
- export { useAuthService, AuthProvider };
5
- export default Auth;
6
+ export { useAuthService, AuthProvider, Auth, Login, Register };
6
7
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.tsx"],"names":[],"mappings":"AAEA,OAAO,IAAmB,MAAM,mBAAmB,CAAC;AACpD,OAAO,EAAE,YAAY,EAAE,MAAM,2BAA2B,CAAC;AACzD,OAAO,cAAc,MAAM,wBAAwB,CAAC;AAKpD,OAAO,EAAE,cAAc,EAAE,YAAY,EAAE,CAAC;AACxC,eAAe,IAAI,CAAC"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,MAAM,cAAc,CAAC;AACjC,OAAO,QAAQ,MAAM,iBAAiB,CAAC;AACvC,OAAO,IAAmB,MAAM,mBAAmB,CAAC;AACpD,OAAO,EAAE,YAAY,EAAE,MAAM,2BAA2B,CAAC;AACzD,OAAO,cAAc,MAAM,wBAAwB,CAAC;AAKpD,OAAO,EAAE,cAAc,EAAE,YAAY,EAAE,IAAI,EAAE,KAAK,EAAE,QAAQ,EAAE,CAAC"}
@@ -244,7 +244,7 @@ export declare const authMachine: import("xstate").StateMachine<AuthMachineConte
244
244
  }, {
245
245
  value: any;
246
246
  context: AuthMachineContext;
247
- }, import("xstate").BaseActionObject, AuthMachineServices, import("xstate").ResolveTypegenMeta<import("./index.typegen").Typegen0, {
247
+ }, import("xstate").BaseActionObject, AuthMachineServices, import("xstate").ResolveTypegenMeta<any, {
248
248
  type: "INITIALIZE";
249
249
  forgeId?: string | null | undefined;
250
250
  } | {
@@ -732,7 +732,7 @@ export declare const authService: (services: {}, context: AuthMachineContext) =>
732
732
  }, {
733
733
  value: any;
734
734
  context: AuthMachineContext;
735
- }, import("xstate").MarkAllImplementationsAsProvided<import("xstate").ResolveTypegenMeta<import("./index.typegen").Typegen0, {
735
+ }, import("xstate").MarkAllImplementationsAsProvided<import("xstate").ResolveTypegenMeta<any, {
736
736
  type: "INITIALIZE";
737
737
  forgeId?: string | null | undefined;
738
738
  } | {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@alore/auth-react-ui",
3
- "version": "1.1.1-alpha",
3
+ "version": "1.1.1-alpha.1",
4
4
  "repository": "https://github.com/0xCarbon/alore-js",
5
5
  "description": "React Auth UI component for Alore",
6
6
  "main": "dist/cjs/index.js",
@@ -8,10 +8,6 @@
8
8
  "files": [
9
9
  "dist"
10
10
  ],
11
- "scripts": {
12
- "prepare": "pnpm build",
13
- "build": "rm -rf dist/* && tsc -p tsconfig-esm.json && tsc -p tsconfig-cjs.json"
14
- },
15
11
  "author": "0xCarbon",
16
12
  "license": "LGPL-2.1-only",
17
13
  "engines": {
@@ -19,8 +15,8 @@
19
15
  },
20
16
  "dependencies": {
21
17
  "@alore/auth-react-sdk": "1.0.7-alpha",
22
- "@azure/msal-browser": "^4.8.0",
23
- "@azure/msal-react": "^3.0.7",
18
+ "@azure/msal-browser": "4.8.0",
19
+ "@azure/msal-react": "3.0.7",
24
20
  "@heroicons/react": "2.0.16",
25
21
  "@hookform/resolvers": "3.1.0",
26
22
  "@react-oauth/google": "0.12.1",
@@ -30,22 +26,28 @@
30
26
  "flowbite": "1.6.6",
31
27
  "js-cookie": "3.0.5",
32
28
  "jwt-decode": "3.1.2",
33
- "react": "18.2.0",
34
- "react-hook-form": "^7.54.2",
29
+ "react-hook-form": "7.54.2",
35
30
  "tailwind-merge": "2.3.0",
36
31
  "xstate": "4.38.2",
37
32
  "yup": "1.1.1"
38
33
  },
39
34
  "devDependencies": {
40
35
  "@types/js-cookie": "3.0.6",
41
- "@types/react": "18.2.79",
36
+ "@types/react": "^18.2.0",
37
+ "@types/react-dom": "^18.2.0",
42
38
  "autoprefixer": "10.4.19",
43
39
  "postcss": "8.4.38",
40
+ "react-dom": "^18.2.0",
44
41
  "tailwindcss": "3.4.17",
45
42
  "typescript": "5.4.5"
46
43
  },
47
44
  "peerDependencies": {
48
- "flowbite-react": "0.11.7"
45
+ "flowbite-react": "^0.12.0",
46
+ "react": "^18.2.0",
47
+ "react-dom": "^18.2.0"
49
48
  },
50
- "packageManager": "pnpm@8.15.7+sha512.c85cd21b6da10332156b1ca2aa79c0a61ee7ad2eb0453b88ab299289e9e8ca93e6091232b25c07cbf61f6df77128d9c849e5c9ac6e44854dbd211c49f3a67adc"
51
- }
49
+ "packageManager": "pnpm@8.15.9",
50
+ "scripts": {
51
+ "build": "rm -rf dist/* && tsc -p tsconfig-esm.json && tsc -p tsconfig-cjs.json"
52
+ }
53
+ }
@@ -1,162 +0,0 @@
1
- export interface Typegen0 {
2
- '@@xstate/typegen': true;
3
- internalEvents: {
4
- "done.invoke.authMachine.active.login.googleLogin:invocation[0]": {
5
- type: "done.invoke.authMachine.active.login.googleLogin:invocation[0]";
6
- data: unknown;
7
- __tip: "See the XState TS docs to learn how to strongly type this.";
8
- };
9
- "done.invoke.authMachine.active.login.resendingEmailCode:invocation[0]": {
10
- type: "done.invoke.authMachine.active.login.resendingEmailCode:invocation[0]";
11
- data: unknown;
12
- __tip: "See the XState TS docs to learn how to strongly type this.";
13
- };
14
- "done.invoke.authMachine.active.login.verifying2faCode:invocation[0]": {
15
- type: "done.invoke.authMachine.active.login.verifying2faCode:invocation[0]";
16
- data: unknown;
17
- __tip: "See the XState TS docs to learn how to strongly type this.";
18
- };
19
- "done.invoke.authMachine.active.login.verifyingCode:invocation[0]": {
20
- type: "done.invoke.authMachine.active.login.verifyingCode:invocation[0]";
21
- data: unknown;
22
- __tip: "See the XState TS docs to learn how to strongly type this.";
23
- };
24
- "done.invoke.authMachine.active.login.verifyingEmail2fa:invocation[0]": {
25
- type: "done.invoke.authMachine.active.login.verifyingEmail2fa:invocation[0]";
26
- data: unknown;
27
- __tip: "See the XState TS docs to learn how to strongly type this.";
28
- };
29
- "done.invoke.authMachine.active.login.verifyingGoogleLogin:invocation[0]": {
30
- type: "done.invoke.authMachine.active.login.verifyingGoogleLogin:invocation[0]";
31
- data: unknown;
32
- __tip: "See the XState TS docs to learn how to strongly type this.";
33
- };
34
- "done.invoke.authMachine.active.login.verifyingHwAuth:invocation[0]": {
35
- type: "done.invoke.authMachine.active.login.verifyingHwAuth:invocation[0]";
36
- data: unknown;
37
- __tip: "See the XState TS docs to learn how to strongly type this.";
38
- };
39
- "done.invoke.authMachine.active.login.verifyingLogin:invocation[0]": {
40
- type: "done.invoke.authMachine.active.login.verifyingLogin:invocation[0]";
41
- data: unknown;
42
- __tip: "See the XState TS docs to learn how to strongly type this.";
43
- };
44
- "done.invoke.authMachine.active.login.verifyingRegisterPublicKeyCredential:invocation[0]": {
45
- type: "done.invoke.authMachine.active.login.verifyingRegisterPublicKeyCredential:invocation[0]";
46
- data: unknown;
47
- __tip: "See the XState TS docs to learn how to strongly type this.";
48
- };
49
- "done.invoke.authMachine.active.register.completingRegistration:invocation[0]": {
50
- type: "done.invoke.authMachine.active.register.completingRegistration:invocation[0]";
51
- data: unknown;
52
- __tip: "See the XState TS docs to learn how to strongly type this.";
53
- };
54
- "done.invoke.authMachine.active.register.googleLogin:invocation[0]": {
55
- type: "done.invoke.authMachine.active.register.googleLogin:invocation[0]";
56
- data: unknown;
57
- __tip: "See the XState TS docs to learn how to strongly type this.";
58
- };
59
- "done.invoke.authMachine.active.register.resendingRegistrationEmail:invocation[0]": {
60
- type: "done.invoke.authMachine.active.register.resendingRegistrationEmail:invocation[0]";
61
- data: unknown;
62
- __tip: "See the XState TS docs to learn how to strongly type this.";
63
- };
64
- "done.invoke.authMachine.active.register.sendingAuthPublicCredential:invocation[0]": {
65
- type: "done.invoke.authMachine.active.register.sendingAuthPublicCredential:invocation[0]";
66
- data: unknown;
67
- __tip: "See the XState TS docs to learn how to strongly type this.";
68
- };
69
- "done.invoke.authMachine.active.register.verifyingEmail:invocation[0]": {
70
- type: "done.invoke.authMachine.active.register.verifyingEmail:invocation[0]";
71
- data: unknown;
72
- __tip: "See the XState TS docs to learn how to strongly type this.";
73
- };
74
- "done.invoke.authMachine.active.web3Connector.verifyingEmailEligibility:invocation[0]": {
75
- type: "done.invoke.authMachine.active.web3Connector.verifyingEmailEligibility:invocation[0]";
76
- data: unknown;
77
- __tip: "See the XState TS docs to learn how to strongly type this.";
78
- };
79
- "xstate.init": {
80
- type: "xstate.init";
81
- };
82
- };
83
- invokeSrcNameMap: {
84
- "authenticateWebauthn": "done.invoke.authMachine.active.login.verifyingHwAuth:invocation[0]";
85
- "completeRegistration": "done.invoke.authMachine.active.register.completingRegistration:invocation[0]";
86
- "confirmPassword": "done.invoke.authMachine.active.forgotPassword.savingPassword:invocation[0]";
87
- "fetchForgeData": "done.invoke.authMachine.active.login.fetchingForgeData:invocation[0]";
88
- "finishPasskeyAuth": "done.invoke.authMachine.active.login.verifyingRegisterPublicKeyCredential:invocation[0]" | "done.invoke.authMachine.active.register.sendingAuthPublicCredential:invocation[0]";
89
- "finishRegisterPasskey": "done.invoke.authMachine.active.register.sendingPublicCredential:invocation[0]";
90
- "googleLogin": "done.invoke.authMachine.active.login.googleLogin:invocation[0]" | "done.invoke.authMachine.active.register.googleLogin:invocation[0]";
91
- "retrieveSalt": "done.invoke.authMachine.active.login.retrievingSalt:invocation[0]";
92
- "sendCode": "done.invoke.authMachine.active.forgotPassword.sendingCode:invocation[0]";
93
- "sendConfirmationEmail": "done.invoke.authMachine.active.register.resendingRegistrationEmail:invocation[0]" | "done.invoke.authMachine.active.register.sendingEmail:invocation[0]";
94
- "startPasskeyAuth": "done.invoke.authMachine.active.login.retrievingCredentialRCR:invocation[0]" | "done.invoke.authMachine.active.register.retrievingRCR:invocation[0]";
95
- "startRegisterPasskey": "done.invoke.authMachine.active.register.retrievingCCR:invocation[0]";
96
- "verify2faCode": "done.invoke.authMachine.active.login.verifying2faCode:invocation[0]";
97
- "verifyClaimNftEmail2fa": "done.invoke.authMachine.active.web3Connector.verifyingClaimNftEmail2fa:invocation[0]";
98
- "verifyDeviceCode": "done.invoke.authMachine.active.login.verifyingCode:invocation[0]";
99
- "verifyEmail": "done.invoke.authMachine.active.register.verifyingEmail:invocation[0]";
100
- "verifyEmail2fa": "done.invoke.authMachine.active.login.verifyingEmail2fa:invocation[0]";
101
- "verifyEmailEligibility": "done.invoke.authMachine.active.web3Connector.verifyingEmailEligibility:invocation[0]";
102
- "verifyGoogleLogin": "done.invoke.authMachine.active.login.verifyingGoogleLogin:invocation[0]";
103
- "verifyLogin": "done.invoke.authMachine.active.login.resendingConfirmationEmail:invocation[0]" | "done.invoke.authMachine.active.login.resendingEmailCode:invocation[0]" | "done.invoke.authMachine.active.login.verifyingLogin:invocation[0]";
104
- };
105
- missingImplementations: {
106
- actions: "setSessionId" | "updateAccessToken";
107
- delays: never;
108
- guards: "isPasskeyEnabled" | "isPasswordAndPasskeyEnabled" | "requireEmailVerification";
109
- services: never;
110
- };
111
- eventsCausingActions: {
112
- "clearContext": "RESET_CONTEXT";
113
- "setSessionId": "done.invoke.authMachine.active.login.resendingEmailCode:invocation[0]" | "done.invoke.authMachine.active.login.verifyingLogin:invocation[0]" | "done.invoke.authMachine.active.register.resendingRegistrationEmail:invocation[0]" | "done.invoke.authMachine.active.web3Connector.verifyingEmailEligibility:invocation[0]";
114
- "setSessionUser": "done.invoke.authMachine.active.login.verifying2faCode:invocation[0]" | "done.invoke.authMachine.active.login.verifyingCode:invocation[0]" | "done.invoke.authMachine.active.login.verifyingEmail2fa:invocation[0]" | "done.invoke.authMachine.active.login.verifyingGoogleLogin:invocation[0]" | "done.invoke.authMachine.active.login.verifyingHwAuth:invocation[0]" | "done.invoke.authMachine.active.login.verifyingRegisterPublicKeyCredential:invocation[0]" | "done.invoke.authMachine.active.register.completingRegistration:invocation[0]" | "done.invoke.authMachine.active.register.sendingAuthPublicCredential:invocation[0]";
115
- "setupRegisterUser": "SETUP_REGISTER_USER";
116
- "updateAccessToken": "REFRESH_ACCESS_TOKEN";
117
- };
118
- eventsCausingDelays: {};
119
- eventsCausingGuards: {
120
- "forgeClaim": "INITIALIZE";
121
- "hasHardware2FA": "done.invoke.authMachine.active.login.verifyingLogin:invocation[0]" | "done.invoke.authMachine.active.login.verifyingRegisterPublicKeyCredential:invocation[0]";
122
- "hasSoftware2FA": "done.invoke.authMachine.active.login.verifyingLogin:invocation[0]" | "done.invoke.authMachine.active.login.verifyingRegisterPublicKeyCredential:invocation[0]";
123
- "isNewDevice": "done.invoke.authMachine.active.login.verifying2faCode:invocation[0]" | "done.invoke.authMachine.active.login.verifyingHwAuth:invocation[0]" | "done.invoke.authMachine.active.login.verifyingLogin:invocation[0]" | "done.invoke.authMachine.active.login.verifyingRegisterPublicKeyCredential:invocation[0]";
124
- "isNewUser": "done.invoke.authMachine.active.login.googleLogin:invocation[0]" | "done.invoke.authMachine.active.register.googleLogin:invocation[0]";
125
- "isPasskeyEnabled": "BACK" | "SELECT_PASSWORD_METHOD" | "SIGN_UP" | "done.invoke.authMachine.active.register.verifyingEmail:invocation[0]";
126
- "isPasswordAndPasskeyEnabled": "BACK" | "PASSKEY_NOT_SUPPORTED" | "SELECT_PASSWORD_METHOD" | "done.invoke.authMachine.active.register.verifyingEmail:invocation[0]";
127
- "requireEmailVerification": "SIGN_UP";
128
- };
129
- eventsCausingServices: {
130
- "authenticateWebauthn": "VERIFY_HW_AUTH";
131
- "completeRegistration": "COMPLETE_REGISTRATION";
132
- "confirmPassword": "CONFIRM_PASSWORD";
133
- "fetchForgeData": "INITIALIZE";
134
- "finishPasskeyAuth": "FINISH_PASSKEY_AUTH" | "FINISH_PASSKEY_LOGIN";
135
- "finishRegisterPasskey": "FINISH_PASSKEY_REGISTER";
136
- "googleLogin": "GOOGLE_LOGIN";
137
- "retrieveSalt": "SELECT_PASSWORD" | "SELECT_PASSWORD_METHOD";
138
- "sendCode": "SEND_CODE";
139
- "sendConfirmationEmail": "RESEND_CODE" | "SEND_REGISTRATION_EMAIL";
140
- "startPasskeyAuth": "SELECT_PASSWORD_METHOD" | "START_PASSKEY_LOGIN";
141
- "startRegisterPasskey": "SIGN_UP" | "START_PASSKEY_REGISTER" | "done.invoke.authMachine.active.register.verifyingEmail:invocation[0]";
142
- "verify2faCode": "CONFIRM_SW_CODE";
143
- "verifyClaimNftEmail2fa": "VERIFY_CLAIM_NFT_EMAIL_2FA";
144
- "verifyDeviceCode": "CONFIRM_DEVICE_CODE";
145
- "verifyEmail": "VERIFY_EMAIL";
146
- "verifyEmail2fa": "VERIFY_EMAIL_2FA";
147
- "verifyEmailEligibility": "VERIFY_EMAIL_ELIGIBILITY";
148
- "verifyGoogleLogin": "COMPLETE_GOOGLE_SIGN_IN";
149
- "verifyLogin": "RESEND_CODE" | "VERIFY_LOGIN";
150
- };
151
- matchesStates: "active" | "active.forgotPassword" | "active.forgotPassword.codeSent" | "active.forgotPassword.idle" | "active.forgotPassword.newPassword" | "active.forgotPassword.passwordSaved" | "active.forgotPassword.savingPassword" | "active.forgotPassword.sendingCode" | "active.login" | "active.login.email2fa" | "active.login.fetchingForgeData" | "active.login.googleLogin" | "active.login.hardware2fa" | "active.login.idle" | "active.login.idle.authScreen" | "active.login.idle.error" | "active.login.idle.localPasskeySign" | "active.login.idle.signWithPasskey" | "active.login.inputPassword" | "active.login.loginMethodSelection" | "active.login.newDevice" | "active.login.resendingConfirmationEmail" | "active.login.resendingEmailCode" | "active.login.retrievingCredentialRCR" | "active.login.retrievingSalt" | "active.login.signingCredentialRCR" | "active.login.software2fa" | "active.login.successfulLogin" | "active.login.verifying2faCode" | "active.login.verifyingCode" | "active.login.verifyingEmail2fa" | "active.login.verifyingGoogleLogin" | "active.login.verifyingHwAuth" | "active.login.verifyingLogin" | "active.login.verifyingRegisterPublicKeyCredential" | "active.register" | "active.register.completingRegistration" | "active.register.createPassword" | "active.register.emailValidation" | "active.register.googleLogin" | "active.register.idle" | "active.register.localCCRSign" | "active.register.localRCRSign" | "active.register.passkeyCreatedButNotAuthenticated" | "active.register.registerMethodSelection" | "active.register.resendingRegistrationEmail" | "active.register.retrievingCCR" | "active.register.retrievingRCR" | "active.register.sendingAuthPublicCredential" | "active.register.sendingEmail" | "active.register.sendingPublicCredential" | "active.register.termsModal" | "active.register.userCreated" | "active.register.verifyingEmail" | "active.register.waitingForRCR" | "active.web3Connector" | "active.web3Connector.connecting" | "active.web3Connector.email2faCode" | "active.web3Connector.emailConfirmed" | "active.web3Connector.emailInput" | "active.web3Connector.idle" | "active.web3Connector.verifyingClaimNftEmail2fa" | "active.web3Connector.verifyingEmailEligibility" | "inactive" | {
152
- "active"?: "forgotPassword" | "login" | "register" | "web3Connector" | {
153
- "forgotPassword"?: "codeSent" | "idle" | "newPassword" | "passwordSaved" | "savingPassword" | "sendingCode";
154
- "login"?: "email2fa" | "fetchingForgeData" | "googleLogin" | "hardware2fa" | "idle" | "inputPassword" | "loginMethodSelection" | "newDevice" | "resendingConfirmationEmail" | "resendingEmailCode" | "retrievingCredentialRCR" | "retrievingSalt" | "signingCredentialRCR" | "software2fa" | "successfulLogin" | "verifying2faCode" | "verifyingCode" | "verifyingEmail2fa" | "verifyingGoogleLogin" | "verifyingHwAuth" | "verifyingLogin" | "verifyingRegisterPublicKeyCredential" | {
155
- "idle"?: "authScreen" | "error" | "localPasskeySign" | "signWithPasskey";
156
- };
157
- "register"?: "completingRegistration" | "createPassword" | "emailValidation" | "googleLogin" | "idle" | "localCCRSign" | "localRCRSign" | "passkeyCreatedButNotAuthenticated" | "registerMethodSelection" | "resendingRegistrationEmail" | "retrievingCCR" | "retrievingRCR" | "sendingAuthPublicCredential" | "sendingEmail" | "sendingPublicCredential" | "termsModal" | "userCreated" | "verifyingEmail" | "waitingForRCR";
158
- "web3Connector"?: "connecting" | "email2faCode" | "emailConfirmed" | "emailInput" | "idle" | "verifyingClaimNftEmail2fa" | "verifyingEmailEligibility";
159
- };
160
- };
161
- tags: never;
162
- }
@@ -1,4 +0,0 @@
1
- "use strict";
2
- // This file was automatically generated. Edits will be overwritten
3
- Object.defineProperty(exports, "__esModule", { value: true });
4
- //# sourceMappingURL=index.typegen.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.typegen.js","sourceRoot":"","sources":["../../../src/machine/index.typegen.ts"],"names":[],"mappings":";AACE,mEAAmE"}
@@ -1,162 +0,0 @@
1
- export interface Typegen0 {
2
- '@@xstate/typegen': true;
3
- internalEvents: {
4
- "done.invoke.authMachine.active.login.googleLogin:invocation[0]": {
5
- type: "done.invoke.authMachine.active.login.googleLogin:invocation[0]";
6
- data: unknown;
7
- __tip: "See the XState TS docs to learn how to strongly type this.";
8
- };
9
- "done.invoke.authMachine.active.login.resendingEmailCode:invocation[0]": {
10
- type: "done.invoke.authMachine.active.login.resendingEmailCode:invocation[0]";
11
- data: unknown;
12
- __tip: "See the XState TS docs to learn how to strongly type this.";
13
- };
14
- "done.invoke.authMachine.active.login.verifying2faCode:invocation[0]": {
15
- type: "done.invoke.authMachine.active.login.verifying2faCode:invocation[0]";
16
- data: unknown;
17
- __tip: "See the XState TS docs to learn how to strongly type this.";
18
- };
19
- "done.invoke.authMachine.active.login.verifyingCode:invocation[0]": {
20
- type: "done.invoke.authMachine.active.login.verifyingCode:invocation[0]";
21
- data: unknown;
22
- __tip: "See the XState TS docs to learn how to strongly type this.";
23
- };
24
- "done.invoke.authMachine.active.login.verifyingEmail2fa:invocation[0]": {
25
- type: "done.invoke.authMachine.active.login.verifyingEmail2fa:invocation[0]";
26
- data: unknown;
27
- __tip: "See the XState TS docs to learn how to strongly type this.";
28
- };
29
- "done.invoke.authMachine.active.login.verifyingGoogleLogin:invocation[0]": {
30
- type: "done.invoke.authMachine.active.login.verifyingGoogleLogin:invocation[0]";
31
- data: unknown;
32
- __tip: "See the XState TS docs to learn how to strongly type this.";
33
- };
34
- "done.invoke.authMachine.active.login.verifyingHwAuth:invocation[0]": {
35
- type: "done.invoke.authMachine.active.login.verifyingHwAuth:invocation[0]";
36
- data: unknown;
37
- __tip: "See the XState TS docs to learn how to strongly type this.";
38
- };
39
- "done.invoke.authMachine.active.login.verifyingLogin:invocation[0]": {
40
- type: "done.invoke.authMachine.active.login.verifyingLogin:invocation[0]";
41
- data: unknown;
42
- __tip: "See the XState TS docs to learn how to strongly type this.";
43
- };
44
- "done.invoke.authMachine.active.login.verifyingRegisterPublicKeyCredential:invocation[0]": {
45
- type: "done.invoke.authMachine.active.login.verifyingRegisterPublicKeyCredential:invocation[0]";
46
- data: unknown;
47
- __tip: "See the XState TS docs to learn how to strongly type this.";
48
- };
49
- "done.invoke.authMachine.active.register.completingRegistration:invocation[0]": {
50
- type: "done.invoke.authMachine.active.register.completingRegistration:invocation[0]";
51
- data: unknown;
52
- __tip: "See the XState TS docs to learn how to strongly type this.";
53
- };
54
- "done.invoke.authMachine.active.register.googleLogin:invocation[0]": {
55
- type: "done.invoke.authMachine.active.register.googleLogin:invocation[0]";
56
- data: unknown;
57
- __tip: "See the XState TS docs to learn how to strongly type this.";
58
- };
59
- "done.invoke.authMachine.active.register.resendingRegistrationEmail:invocation[0]": {
60
- type: "done.invoke.authMachine.active.register.resendingRegistrationEmail:invocation[0]";
61
- data: unknown;
62
- __tip: "See the XState TS docs to learn how to strongly type this.";
63
- };
64
- "done.invoke.authMachine.active.register.sendingAuthPublicCredential:invocation[0]": {
65
- type: "done.invoke.authMachine.active.register.sendingAuthPublicCredential:invocation[0]";
66
- data: unknown;
67
- __tip: "See the XState TS docs to learn how to strongly type this.";
68
- };
69
- "done.invoke.authMachine.active.register.verifyingEmail:invocation[0]": {
70
- type: "done.invoke.authMachine.active.register.verifyingEmail:invocation[0]";
71
- data: unknown;
72
- __tip: "See the XState TS docs to learn how to strongly type this.";
73
- };
74
- "done.invoke.authMachine.active.web3Connector.verifyingEmailEligibility:invocation[0]": {
75
- type: "done.invoke.authMachine.active.web3Connector.verifyingEmailEligibility:invocation[0]";
76
- data: unknown;
77
- __tip: "See the XState TS docs to learn how to strongly type this.";
78
- };
79
- "xstate.init": {
80
- type: "xstate.init";
81
- };
82
- };
83
- invokeSrcNameMap: {
84
- "authenticateWebauthn": "done.invoke.authMachine.active.login.verifyingHwAuth:invocation[0]";
85
- "completeRegistration": "done.invoke.authMachine.active.register.completingRegistration:invocation[0]";
86
- "confirmPassword": "done.invoke.authMachine.active.forgotPassword.savingPassword:invocation[0]";
87
- "fetchForgeData": "done.invoke.authMachine.active.login.fetchingForgeData:invocation[0]";
88
- "finishPasskeyAuth": "done.invoke.authMachine.active.login.verifyingRegisterPublicKeyCredential:invocation[0]" | "done.invoke.authMachine.active.register.sendingAuthPublicCredential:invocation[0]";
89
- "finishRegisterPasskey": "done.invoke.authMachine.active.register.sendingPublicCredential:invocation[0]";
90
- "googleLogin": "done.invoke.authMachine.active.login.googleLogin:invocation[0]" | "done.invoke.authMachine.active.register.googleLogin:invocation[0]";
91
- "retrieveSalt": "done.invoke.authMachine.active.login.retrievingSalt:invocation[0]";
92
- "sendCode": "done.invoke.authMachine.active.forgotPassword.sendingCode:invocation[0]";
93
- "sendConfirmationEmail": "done.invoke.authMachine.active.register.resendingRegistrationEmail:invocation[0]" | "done.invoke.authMachine.active.register.sendingEmail:invocation[0]";
94
- "startPasskeyAuth": "done.invoke.authMachine.active.login.retrievingCredentialRCR:invocation[0]" | "done.invoke.authMachine.active.register.retrievingRCR:invocation[0]";
95
- "startRegisterPasskey": "done.invoke.authMachine.active.register.retrievingCCR:invocation[0]";
96
- "verify2faCode": "done.invoke.authMachine.active.login.verifying2faCode:invocation[0]";
97
- "verifyClaimNftEmail2fa": "done.invoke.authMachine.active.web3Connector.verifyingClaimNftEmail2fa:invocation[0]";
98
- "verifyDeviceCode": "done.invoke.authMachine.active.login.verifyingCode:invocation[0]";
99
- "verifyEmail": "done.invoke.authMachine.active.register.verifyingEmail:invocation[0]";
100
- "verifyEmail2fa": "done.invoke.authMachine.active.login.verifyingEmail2fa:invocation[0]";
101
- "verifyEmailEligibility": "done.invoke.authMachine.active.web3Connector.verifyingEmailEligibility:invocation[0]";
102
- "verifyGoogleLogin": "done.invoke.authMachine.active.login.verifyingGoogleLogin:invocation[0]";
103
- "verifyLogin": "done.invoke.authMachine.active.login.resendingConfirmationEmail:invocation[0]" | "done.invoke.authMachine.active.login.resendingEmailCode:invocation[0]" | "done.invoke.authMachine.active.login.verifyingLogin:invocation[0]";
104
- };
105
- missingImplementations: {
106
- actions: "setSessionId" | "updateAccessToken";
107
- delays: never;
108
- guards: "isPasskeyEnabled" | "isPasswordAndPasskeyEnabled" | "requireEmailVerification";
109
- services: never;
110
- };
111
- eventsCausingActions: {
112
- "clearContext": "RESET_CONTEXT";
113
- "setSessionId": "done.invoke.authMachine.active.login.resendingEmailCode:invocation[0]" | "done.invoke.authMachine.active.login.verifyingLogin:invocation[0]" | "done.invoke.authMachine.active.register.resendingRegistrationEmail:invocation[0]" | "done.invoke.authMachine.active.web3Connector.verifyingEmailEligibility:invocation[0]";
114
- "setSessionUser": "done.invoke.authMachine.active.login.verifying2faCode:invocation[0]" | "done.invoke.authMachine.active.login.verifyingCode:invocation[0]" | "done.invoke.authMachine.active.login.verifyingEmail2fa:invocation[0]" | "done.invoke.authMachine.active.login.verifyingGoogleLogin:invocation[0]" | "done.invoke.authMachine.active.login.verifyingHwAuth:invocation[0]" | "done.invoke.authMachine.active.login.verifyingRegisterPublicKeyCredential:invocation[0]" | "done.invoke.authMachine.active.register.completingRegistration:invocation[0]" | "done.invoke.authMachine.active.register.sendingAuthPublicCredential:invocation[0]";
115
- "setupRegisterUser": "SETUP_REGISTER_USER";
116
- "updateAccessToken": "REFRESH_ACCESS_TOKEN";
117
- };
118
- eventsCausingDelays: {};
119
- eventsCausingGuards: {
120
- "forgeClaim": "INITIALIZE";
121
- "hasHardware2FA": "done.invoke.authMachine.active.login.verifyingLogin:invocation[0]" | "done.invoke.authMachine.active.login.verifyingRegisterPublicKeyCredential:invocation[0]";
122
- "hasSoftware2FA": "done.invoke.authMachine.active.login.verifyingLogin:invocation[0]" | "done.invoke.authMachine.active.login.verifyingRegisterPublicKeyCredential:invocation[0]";
123
- "isNewDevice": "done.invoke.authMachine.active.login.verifying2faCode:invocation[0]" | "done.invoke.authMachine.active.login.verifyingHwAuth:invocation[0]" | "done.invoke.authMachine.active.login.verifyingLogin:invocation[0]" | "done.invoke.authMachine.active.login.verifyingRegisterPublicKeyCredential:invocation[0]";
124
- "isNewUser": "done.invoke.authMachine.active.login.googleLogin:invocation[0]" | "done.invoke.authMachine.active.register.googleLogin:invocation[0]";
125
- "isPasskeyEnabled": "BACK" | "SELECT_PASSWORD_METHOD" | "SIGN_UP" | "done.invoke.authMachine.active.register.verifyingEmail:invocation[0]";
126
- "isPasswordAndPasskeyEnabled": "BACK" | "PASSKEY_NOT_SUPPORTED" | "SELECT_PASSWORD_METHOD" | "done.invoke.authMachine.active.register.verifyingEmail:invocation[0]";
127
- "requireEmailVerification": "SIGN_UP";
128
- };
129
- eventsCausingServices: {
130
- "authenticateWebauthn": "VERIFY_HW_AUTH";
131
- "completeRegistration": "COMPLETE_REGISTRATION";
132
- "confirmPassword": "CONFIRM_PASSWORD";
133
- "fetchForgeData": "INITIALIZE";
134
- "finishPasskeyAuth": "FINISH_PASSKEY_AUTH" | "FINISH_PASSKEY_LOGIN";
135
- "finishRegisterPasskey": "FINISH_PASSKEY_REGISTER";
136
- "googleLogin": "GOOGLE_LOGIN";
137
- "retrieveSalt": "SELECT_PASSWORD" | "SELECT_PASSWORD_METHOD";
138
- "sendCode": "SEND_CODE";
139
- "sendConfirmationEmail": "RESEND_CODE" | "SEND_REGISTRATION_EMAIL";
140
- "startPasskeyAuth": "SELECT_PASSWORD_METHOD" | "START_PASSKEY_LOGIN";
141
- "startRegisterPasskey": "SIGN_UP" | "START_PASSKEY_REGISTER" | "done.invoke.authMachine.active.register.verifyingEmail:invocation[0]";
142
- "verify2faCode": "CONFIRM_SW_CODE";
143
- "verifyClaimNftEmail2fa": "VERIFY_CLAIM_NFT_EMAIL_2FA";
144
- "verifyDeviceCode": "CONFIRM_DEVICE_CODE";
145
- "verifyEmail": "VERIFY_EMAIL";
146
- "verifyEmail2fa": "VERIFY_EMAIL_2FA";
147
- "verifyEmailEligibility": "VERIFY_EMAIL_ELIGIBILITY";
148
- "verifyGoogleLogin": "COMPLETE_GOOGLE_SIGN_IN";
149
- "verifyLogin": "RESEND_CODE" | "VERIFY_LOGIN";
150
- };
151
- matchesStates: "active" | "active.forgotPassword" | "active.forgotPassword.codeSent" | "active.forgotPassword.idle" | "active.forgotPassword.newPassword" | "active.forgotPassword.passwordSaved" | "active.forgotPassword.savingPassword" | "active.forgotPassword.sendingCode" | "active.login" | "active.login.email2fa" | "active.login.fetchingForgeData" | "active.login.googleLogin" | "active.login.hardware2fa" | "active.login.idle" | "active.login.idle.authScreen" | "active.login.idle.error" | "active.login.idle.localPasskeySign" | "active.login.idle.signWithPasskey" | "active.login.inputPassword" | "active.login.loginMethodSelection" | "active.login.newDevice" | "active.login.resendingConfirmationEmail" | "active.login.resendingEmailCode" | "active.login.retrievingCredentialRCR" | "active.login.retrievingSalt" | "active.login.signingCredentialRCR" | "active.login.software2fa" | "active.login.successfulLogin" | "active.login.verifying2faCode" | "active.login.verifyingCode" | "active.login.verifyingEmail2fa" | "active.login.verifyingGoogleLogin" | "active.login.verifyingHwAuth" | "active.login.verifyingLogin" | "active.login.verifyingRegisterPublicKeyCredential" | "active.register" | "active.register.completingRegistration" | "active.register.createPassword" | "active.register.emailValidation" | "active.register.googleLogin" | "active.register.idle" | "active.register.localCCRSign" | "active.register.localRCRSign" | "active.register.passkeyCreatedButNotAuthenticated" | "active.register.registerMethodSelection" | "active.register.resendingRegistrationEmail" | "active.register.retrievingCCR" | "active.register.retrievingRCR" | "active.register.sendingAuthPublicCredential" | "active.register.sendingEmail" | "active.register.sendingPublicCredential" | "active.register.termsModal" | "active.register.userCreated" | "active.register.verifyingEmail" | "active.register.waitingForRCR" | "active.web3Connector" | "active.web3Connector.connecting" | "active.web3Connector.email2faCode" | "active.web3Connector.emailConfirmed" | "active.web3Connector.emailInput" | "active.web3Connector.idle" | "active.web3Connector.verifyingClaimNftEmail2fa" | "active.web3Connector.verifyingEmailEligibility" | "inactive" | {
152
- "active"?: "forgotPassword" | "login" | "register" | "web3Connector" | {
153
- "forgotPassword"?: "codeSent" | "idle" | "newPassword" | "passwordSaved" | "savingPassword" | "sendingCode";
154
- "login"?: "email2fa" | "fetchingForgeData" | "googleLogin" | "hardware2fa" | "idle" | "inputPassword" | "loginMethodSelection" | "newDevice" | "resendingConfirmationEmail" | "resendingEmailCode" | "retrievingCredentialRCR" | "retrievingSalt" | "signingCredentialRCR" | "software2fa" | "successfulLogin" | "verifying2faCode" | "verifyingCode" | "verifyingEmail2fa" | "verifyingGoogleLogin" | "verifyingHwAuth" | "verifyingLogin" | "verifyingRegisterPublicKeyCredential" | {
155
- "idle"?: "authScreen" | "error" | "localPasskeySign" | "signWithPasskey";
156
- };
157
- "register"?: "completingRegistration" | "createPassword" | "emailValidation" | "googleLogin" | "idle" | "localCCRSign" | "localRCRSign" | "passkeyCreatedButNotAuthenticated" | "registerMethodSelection" | "resendingRegistrationEmail" | "retrievingCCR" | "retrievingRCR" | "sendingAuthPublicCredential" | "sendingEmail" | "sendingPublicCredential" | "termsModal" | "userCreated" | "verifyingEmail" | "waitingForRCR";
158
- "web3Connector"?: "connecting" | "email2faCode" | "emailConfirmed" | "emailInput" | "idle" | "verifyingClaimNftEmail2fa" | "verifyingEmailEligibility";
159
- };
160
- };
161
- tags: never;
162
- }
@@ -1,3 +0,0 @@
1
- // This file was automatically generated. Edits will be overwritten
2
- export {};
3
- //# sourceMappingURL=index.typegen.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.typegen.js","sourceRoot":"","sources":["../../../src/machine/index.typegen.ts"],"names":[],"mappings":"AACE,mEAAmE"}