diff --git a/e2e/apps/react-native-oidc/app.config.ts b/e2e/apps/react-native-oidc/app.config.ts index 7856dac..54b1c51 100644 --- a/e2e/apps/react-native-oidc/app.config.ts +++ b/e2e/apps/react-native-oidc/app.config.ts @@ -17,5 +17,28 @@ export default ({ config }: ConfigContext) => ({ ...config, extra: { env - } + }, + newArchEnabled: true, + "android": { + "package": "com.anonymous.reporeactnativeoidc" + }, + "ios": { + "bundleIdentifier": "com.anonymous.reporeactnativeoidc" + }, + scheme: "com.oktapreview.jperreault-test", + "plugins": [ + "expo-font", + "expo-router", + [ + "expo-build-properties", + { + "ios": { + "newArchEnabled": true + }, + "android": { + "newArchEnabled": true + } + } + ] + ] }); \ No newline at end of file diff --git a/e2e/apps/react-native-oidc/app/(login)/_layout.tsx b/e2e/apps/react-native-oidc/app/(login)/_layout.tsx deleted file mode 100644 index aa7f199..0000000 --- a/e2e/apps/react-native-oidc/app/(login)/_layout.tsx +++ /dev/null @@ -1,45 +0,0 @@ -import { Tabs } from 'expo-router'; -import React from 'react'; -import { Platform } from 'react-native'; - -import { HapticTab } from '@/components/HapticTab'; -import { IconSymbol } from '@/components/ui/IconSymbol'; -import TabBarBackground from '@/components/ui/TabBarBackground'; -import { Colors } from '@/constants/Colors'; -import { useColorScheme } from '@/hooks/useColorScheme'; - -export default function TabLayout() { - const colorScheme = useColorScheme(); - - return ( - - , - }} - /> - , - }} - /> - - ); -} diff --git a/e2e/apps/react-native-oidc/app/(login)/index.tsx b/e2e/apps/react-native-oidc/app/(login)/index.tsx deleted file mode 100644 index 13dcace..0000000 --- a/e2e/apps/react-native-oidc/app/(login)/index.tsx +++ /dev/null @@ -1,56 +0,0 @@ -import { useEffect } from 'react'; -import { StyleSheet } from 'react-native'; -import { Image } from 'expo-image'; -import Constants from 'expo-constants'; -import { useAuth } from '@/hooks/useAuth'; - -import ParallaxScrollView from '@/components/ParallaxScrollView'; -import { ThemedText } from '@/components/ThemedText'; -import { ThemedView } from '@/components/ThemedView'; -import { HelloWave } from '@/components/HelloWave'; - - -export default function LoginScreen () { - const { signIn } = useAuth(); - - useEffect(() => { - (async () => { - await signIn('/(login)/token'); - })(); - }, [signIn]); - - return ( - - }> - - Loading... - - - - ); -} - -const styles = StyleSheet.create({ - container: { - flex: 1, - marginTop: Constants.statusBarHeight, - }, - titleContainer: { - flexDirection: 'row', - alignItems: 'center', - gap: 8, - }, - reactLogo: { - height: 178, - width: 290, - bottom: 0, - left: 0, - position: 'absolute', - }, -}); diff --git a/e2e/apps/react-native-oidc/app/(login)/token.tsx b/e2e/apps/react-native-oidc/app/(login)/token.tsx deleted file mode 100644 index 2992061..0000000 --- a/e2e/apps/react-native-oidc/app/(login)/token.tsx +++ /dev/null @@ -1,104 +0,0 @@ -import { useEffect, useState } from 'react'; -import { Button, StyleSheet } from 'react-native'; -import { Image } from 'expo-image'; -import { useRouter } from 'expo-router'; -import Constants from 'expo-constants'; -import { Credential, Token } from '@okta/auth-foundation'; -import { useAuth } from '@/hooks/useAuth'; - -import ParallaxScrollView from '@/components/ParallaxScrollView'; -import { ThemedText } from '@/components/ThemedText'; -import { ThemedView } from '@/components/ThemedView'; -import { HelloWave } from '@/components/HelloWave'; - - -export default function TokenScreen () { - const router = useRouter(); - const { signOut } = useAuth(); - const [token, setToken] = useState(null); - - useEffect(() => { - (async () => { - try { - const credential = await Credential.getDefault(); - if (credential) { - setToken(credential.token); - } - else { - router.navigate('/(login)'); - } - } - catch (err) { - console.log('error'); - console.log(err, (err as Error)?.stack); - throw err; - } - })(); - }, [router, token, setToken]); - - let body = ( - - Loading... - - - ); - - if (token) { - body = ( - <> - - Token - - - - Access Token - {token.accessToken} - Refresh Token - {token?.refreshToken} - - -