()
| 32 | }); |
| 33 | |
| 34 | const 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 | |
| 68 | export default App; |
nothing calls this directly
no outgoing calls
no test coverage detected