MCPcopy Create free account
hub / github.com/auth0-samples/auth0-ionic-samples / LoginButton

Function LoginButton

react/src/components/LoginButton.tsx:5–20  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

3import { IonButton } from "@ionic/react";
4
5const LoginButton: React.FC = () => {
6 const { loginWithRedirect } = useAuth0();
7
8 const login = async () => {
9 await loginWithRedirect({
10 async openUrl(url) {
11 await Browser.open({
12 url,
13 windowName: "_self"
14 });
15 }
16 });
17 };
18
19 return <IonButton onClick={login}>Log in</IonButton>;
20};
21
22export default LoginButton;

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected