MCPcopy Create free account
hub / github.com/dailydotdev/apps / onVerifyCodeBetterAuth

Function onVerifyCodeBetterAuth

packages/webapp/pages/settings/security.tsx:81–93  ·  view source on GitHub ↗
(code: string)

Source from the content-addressed store, hash-verified

79 }
80 };
81 const onVerifyCodeBetterAuth = async (code: string) => {
82 if (!pendingEmail) {
83 throw new Error('Request a verification code first');
84 }
85 const result = await betterAuthVerifyChangeEmail(pendingEmail, code);
86 if (result.error) {
87 throw new Error(result.error);
88 }
89 displayToast('Your email address has been updated.');
90 setPendingEmail(undefined);
91 setActiveDisplay(Display.Default);
92 await refetchBoot?.();
93 };
94
95 const onChangeEmail = async (email: string) => {
96 if (!email) {

Callers

nothing calls this directly

Calls 2

displayToastFunction · 0.85

Tested by

no test coverage detected