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

Function App

react/src/App.tsx:34–66  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

32});
33
34const App: React.FC = () => {
35 const { handleRedirectCallback } = useAuth0();
36
37 useEffect(() => {
38 CapApp.addListener("appUrlOpen", async ({ url }) => {
39 if (url.startsWith(callbackUri)) {
40 if (
41 url.includes("state") &&
42 (url.includes("code") || url.includes("error"))
43 ) {
44 await handleRedirectCallback(url);
45 }
46
47 await Browser.close();
48 }
49 });
50 }, [handleRedirectCallback]);
51
52 return (
53 <IonApp>
54 <IonReactRouter>
55 <IonRouterOutlet>
56 <Route exact path="/home">
57 <Home />
58 </Route>
59 <Route exact path="/">
60 <Redirect to="/home" />
61 </Route>
62 </IonRouterOutlet>
63 </IonReactRouter>
64 </IonApp>
65 );
66};
67
68export default App;

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected