diff options
author | Sebastian <sebasjm@gmail.com> | 2021-11-09 00:19:50 -0300 |
---|---|---|
committer | Sebastian <sebasjm@gmail.com> | 2021-11-09 00:19:50 -0300 |
commit | 7f6101a24df0db86f33c3217e52838f09a25286d (patch) | |
tree | 9a8d170d4bfe2c2a49820fa10db46379140316d8 /packages/anastasis-webui/src/pages/home/authMethod/index.tsx | |
parent | e369f26ec57c5571af81c534b378035a3e41919c (diff) | |
download | wallet-core-7f6101a24df0db86f33c3217e52838f09a25286d.tar.xz |
add provider/ remove provider
Diffstat (limited to 'packages/anastasis-webui/src/pages/home/authMethod/index.tsx')
-rw-r--r-- | packages/anastasis-webui/src/pages/home/authMethod/index.tsx | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/packages/anastasis-webui/src/pages/home/authMethod/index.tsx b/packages/anastasis-webui/src/pages/home/authMethod/index.tsx index 07f6ec206..8b0126ce7 100644 --- a/packages/anastasis-webui/src/pages/home/authMethod/index.tsx +++ b/packages/anastasis-webui/src/pages/home/authMethod/index.tsx @@ -41,7 +41,13 @@ interface AuthMethodConfiguration { solve: (props: AuthMethodSolveProps) => VNode; skip?: boolean; } -export type KnownAuthMethods = "sms" | "email" | "post" | "question" | "video" | "totp" | "iban"; +// export type KnownAuthMethods = "sms" | "email" | "post" | "question" | "video" | "totp" | "iban"; + +const ALL_METHODS = ['sms', 'email', 'post', 'question', 'video' , 'totp', 'iban'] as const; +export type KnownAuthMethods = (typeof ALL_METHODS)[number]; +export function isKnownAuthMethods(value: string): value is KnownAuthMethods { + return ALL_METHODS.includes(value as KnownAuthMethods) +} type KnowMethodConfig = { [name in KnownAuthMethods]: AuthMethodConfiguration; |