Skip to content

Commit

Permalink
add platform to params
Browse files Browse the repository at this point in the history
  • Loading branch information
lionellbriones committed Feb 13, 2025
1 parent 97e3f3d commit 8ad3fd2
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 1 deletion.
10 changes: 10 additions & 0 deletions src/utils/constants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -66,3 +66,13 @@ export const BUILD_ENV = {
STAGING: "staging",
TESTING: "testing",
} as const;

export const APP_PLATFORMS = {
ANDROID: "android",
IOS: "ios",
NATIVE: "react-native",
FLUTTER: "flutter",
UNITY: "unity",
UNREAL: "unreal",
EMBED: "embed",
} as const;
10 changes: 9 additions & 1 deletion src/utils/interfaces.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { type TORUS_LEGACY_NETWORK_TYPE, type TORUS_SAPPHIRE_NETWORK_TYPE } from "@toruslabs/constants";

import { AUTH_ACTIONS, BUILD_ENV, LOGIN_PROVIDER, MFA_LEVELS, SUPPORTED_KEY_CURVES, UX_MODE, WEB3AUTH_NETWORK } from "./constants";
import { APP_PLATFORMS, AUTH_ACTIONS, BUILD_ENV, LOGIN_PROVIDER, MFA_LEVELS, SUPPORTED_KEY_CURVES, UX_MODE, WEB3AUTH_NETWORK } from "./constants";

export type WEB3AUTH_LEGACY_NETWORK_TYPE = TORUS_LEGACY_NETWORK_TYPE;
export type WEB3AUTH_SAPPHIRE_NETWORK_TYPE = TORUS_SAPPHIRE_NETWORK_TYPE;
Expand Down Expand Up @@ -43,6 +43,8 @@ export type CUSTOM_LOGIN_PROVIDER_TYPE = string & { toString?: (radix?: number)

export type MfaLevelType = (typeof MFA_LEVELS)[keyof typeof MFA_LEVELS];

export type APP_PLATFORMS_TYPE = (typeof APP_PLATFORMS)[keyof typeof APP_PLATFORMS];

export type SUPPORTED_KEY_CURVES_TYPE = (typeof SUPPORTED_KEY_CURVES)[keyof typeof SUPPORTED_KEY_CURVES];

export type WEB3AUTH_NETWORK_TYPE = (typeof WEB3AUTH_NETWORK)[keyof typeof WEB3AUTH_NETWORK];
Expand Down Expand Up @@ -215,6 +217,12 @@ export type LoginParams = BaseRedirectParams & {
*
*/
dappUrl?: string;

/**
* Allows the dapp to set a platform for the manage mfa flow.
*
*/
platform?: APP_PLATFORMS_TYPE;
};

export type SocialMfaModParams = {
Expand Down

0 comments on commit 8ad3fd2

Please sign in to comment.