Skip to content

Commit

Permalink
feat: add web3auth mfa level support (#538)
Browse files Browse the repository at this point in the history
  • Loading branch information
fmorency authored Jan 29, 2025
1 parent f609828 commit 36579fb
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
2 changes: 2 additions & 0 deletions wallets/web3auth/src/extension/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import { Wallet } from '@cosmos-kit/core';
import { Ecies } from '@toruslabs/eccrypto';
import {
LOGIN_PROVIDER_TYPE,
MfaLevelType,
WEB3AUTH_NETWORK_TYPE,
} from '@web3auth/auth-adapter';
import { Web3AuthNoModalOptions } from '@web3auth/base';
Expand All @@ -19,6 +20,7 @@ export type Web3AuthLoginMethod = {

export type Web3AuthClientOptions = {
loginProvider: LOGIN_PROVIDER_TYPE;
mfaLevel?: MfaLevelType;
getLoginHint?: () => string | undefined;

// Web3Auth client options.
Expand Down
4 changes: 4 additions & 0 deletions wallets/web3auth/src/extension/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -157,10 +157,14 @@ export const connectClientAndProvider = async (
);
}

const mfaLevel = options.mfaLevel ?? 'default';
const authAdapter = new AuthAdapter({
adapterSettings: {
uxMode,
},
loginSettings: {
mfaLevel,
},
});
client.configureAdapter(authAdapter);

Expand Down

0 comments on commit 36579fb

Please sign in to comment.