MCPcopy Create free account
hub / github.com/Web3Auth/Auth / login

Function login

examples/react-example/src/App.tsx:31–45  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

29 };
30
31 async function login() {
32 setLoading(true);
33 try {
34 await auth.login({
35 authConnection: AUTH_CONNECTION.GITHUB,
36 });
37 if (auth.privKey) {
38 await printUserInfo();
39 }
40 setLoading(false);
41 } catch (error) {
42 log.error("error", error);
43 setLoading(false);
44 }
45 }
46
47 useEffect(() => {
48 setLoading(true);

Callers

nothing calls this directly

Calls 2

printUserInfoFunction · 0.85
loginMethod · 0.80

Tested by

no test coverage detected