Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add support to manage mfa with web3auth #2037

Merged
merged 3 commits into from
Dec 12, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
minor cleanup
  • Loading branch information
chaitanyapotti committed Dec 12, 2024
commit 9c3e769b9dcf4e1c6978f4f602c9765941d52d6a
Original file line number Diff line number Diff line change
Expand Up @@ -57,9 +57,6 @@ export const Web3AuthProvider = defineComponent({
if (!web3Auth.value) throw WalletInitializationError.notReady();
if (!isConnected.value) throw WalletLoginError.notConnectedError();
await web3Auth.value.manageMFA(loginParams);
const localUserInfo = await web3Auth.value.getUserInfo();
userInfo.value = localUserInfo;
isMFAEnabled.value = localUserInfo.isMfaEnabled || false;
};

const logout = async (logoutParams: { cleanup: boolean } = { cleanup: false }) => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -58,9 +58,6 @@ export const Web3AuthProvider = defineComponent({
if (!web3Auth.value) throw WalletInitializationError.notReady();
if (!isConnected.value) throw WalletLoginError.notConnectedError();
await web3Auth.value.manageMFA(loginParams);
const localUserInfo = await web3Auth.value.getUserInfo();
userInfo.value = localUserInfo;
isMFAEnabled.value = localUserInfo.isMfaEnabled || false;
};

const logout = async (logoutParams: { cleanup: boolean } = { cleanup: false }) => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -64,9 +64,6 @@ export function Web3AuthInnerProvider(params: PropsWithChildren<Web3AuthProvider
if (!web3Auth) throw WalletInitializationError.notReady();
if (!isConnected) throw WalletLoginError.notConnectedError();
await web3Auth.manageMFA(loginParams);
const localUserInfo = await web3Auth.getUserInfo();
setUserInfo(localUserInfo);
setIsMFAEnabled(localUserInfo.isMfaEnabled || false);
},
[web3Auth, isConnected]
);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -167,9 +167,6 @@ export function Web3AuthInnerProvider(params: PropsWithChildren<Web3AuthProvider
if (!web3Auth) throw WalletInitializationError.notReady();
if (!isConnected) throw WalletLoginError.notConnectedError();
await web3Auth.manageMFA(loginParams);
const localUserInfo = await web3Auth.getUserInfo();
setUserInfo(localUserInfo);
setIsMFAEnabled(localUserInfo.isMfaEnabled || false);
},
[web3Auth, isConnected]
);
Expand Down
Loading