diff --git a/.idea/.gitignore b/.idea/.gitignore
new file mode 100644
index 0000000..13566b8
--- /dev/null
+++ b/.idea/.gitignore
@@ -0,0 +1,8 @@
+# Default ignored files
+/shelf/
+/workspace.xml
+# Editor-based HTTP Client requests
+/httpRequests/
+# Datasource local storage ignored files
+/dataSources/
+/dataSources.local.xml
diff --git a/.idea/dbnavigator.xml b/.idea/dbnavigator.xml
new file mode 100644
index 0000000..995266b
--- /dev/null
+++ b/.idea/dbnavigator.xml
@@ -0,0 +1,468 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/modules.xml b/.idea/modules.xml
new file mode 100644
index 0000000..765b80d
--- /dev/null
+++ b/.idea/modules.xml
@@ -0,0 +1,8 @@
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/noscomptes.iml b/.idea/noscomptes.iml
new file mode 100644
index 0000000..d6ebd48
--- /dev/null
+++ b/.idea/noscomptes.iml
@@ -0,0 +1,9 @@
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/runConfigurations.xml b/.idea/runConfigurations.xml
new file mode 100644
index 0000000..797acea
--- /dev/null
+++ b/.idea/runConfigurations.xml
@@ -0,0 +1,10 @@
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/vcs.xml b/.idea/vcs.xml
new file mode 100644
index 0000000..35eb1dd
--- /dev/null
+++ b/.idea/vcs.xml
@@ -0,0 +1,6 @@
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/watcherTasks.xml b/.idea/watcherTasks.xml
new file mode 100644
index 0000000..27aa2e8
--- /dev/null
+++ b/.idea/watcherTasks.xml
@@ -0,0 +1,9 @@
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/App.tsx b/App.tsx
index 20ed07d..f151b75 100644
--- a/App.tsx
+++ b/App.tsx
@@ -8,7 +8,6 @@ import Navigation from './navigation';
export default function App() {
const isLoadingComplete = useCachedResources();
const colorScheme = useColorScheme();
-
if (!isLoadingComplete) {
return null;
} else {
diff --git a/app.json b/app.json
index fee6657..f25836b 100644
--- a/app.json
+++ b/app.json
@@ -19,9 +19,11 @@
"**/*"
],
"ios": {
- "supportsTablet": true
+ "supportsTablet": true,
+ "bundleIdentifier": "com.pandere.noscomptes"
},
"android": {
+ "package": "com.pandere.noscomptes",
"adaptiveIcon": {
"foregroundImage": "./assets/images/adaptive-icon.png",
"backgroundColor": "#ffffff"
diff --git a/navigation/LinkingConfiguration.ts b/navigation/LinkingConfiguration.ts
index 3fc358e..fa47e34 100644
--- a/navigation/LinkingConfiguration.ts
+++ b/navigation/LinkingConfiguration.ts
@@ -27,7 +27,7 @@ const linking: LinkingOptions = {
},
},
},
- Modal: 'modal',
+ Login: "login",
NotFound: '*',
},
},
diff --git a/navigation/index.tsx b/navigation/index.tsx
index 21cea97..24c8025 100644
--- a/navigation/index.tsx
+++ b/navigation/index.tsx
@@ -12,12 +12,13 @@ import { ColorSchemeName, Pressable } from 'react-native';
import Colors from '../constants/Colors';
import useColorScheme from '../hooks/useColorScheme';
-import ModalScreen from '../screens/ModalScreen';
import NotFoundScreen from '../screens/NotFoundScreen';
import TabOneScreen from '../screens/TabOneScreen';
import TabTwoScreen from '../screens/TabTwoScreen';
import { RootStackParamList, RootTabParamList, RootTabScreenProps } from '../types';
import LinkingConfiguration from './LinkingConfiguration';
+import {useState} from "react";
+import AuthScreen from "../screens/AuthScreen";
export default function Navigation({ colorScheme }: { colorScheme: ColorSchemeName }) {
return (
@@ -36,15 +37,24 @@ export default function Navigation({ colorScheme }: { colorScheme: ColorSchemeNa
const Stack = createNativeStackNavigator();
function RootNavigator() {
+ const [authentication, setAuthentication] = useState();
+ const updateAuthentication = (authentication: any) => {
+ setAuthentication(authentication);
+ }
+
return (
-
+
+
+ { authentication == null ? (
+
+
+ ) : (
+
-
-
-
-
-
- );
+
+)}
+
+);
}
/**
@@ -68,20 +78,6 @@ function BottomTabNavigator() {
options={({ navigation }: RootTabScreenProps<'TabOne'>) => ({
title: 'Tab One',
tabBarIcon: ({ color }) => ,
- headerRight: () => (
- navigation.navigate('Modal')}
- style={({ pressed }) => ({
- opacity: pressed ? 0.5 : 1,
- })}>
-
-
- ),
})}
/>
=0.6"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/ljharb"
+ }
+ },
"node_modules/expo-constants": {
"version": "13.0.2",
"resolved": "https://registry.npmjs.org/expo-constants/-/expo-constants-13.0.2.tgz",
@@ -6191,6 +6226,14 @@
"expo": "*"
}
},
+ "node_modules/expo-crypto": {
+ "version": "10.1.2",
+ "resolved": "https://registry.npmjs.org/expo-crypto/-/expo-crypto-10.1.2.tgz",
+ "integrity": "sha512-TYaBtV9oK5OH+EfsAUHQkWkRPifZjCMDn6Yf9gk3/LyHdJHDYnB6NQWTJo9Qkl6vzI9svQ6PMnQTm2Yxrb3ZfQ==",
+ "peerDependencies": {
+ "expo": "*"
+ }
+ },
"node_modules/expo-error-recovery": {
"version": "3.0.5",
"resolved": "https://registry.npmjs.org/expo-error-recovery/-/expo-error-recovery-3.0.5.tgz",
@@ -6352,6 +6395,25 @@
"invariant": "^2.2.4"
}
},
+ "node_modules/expo-random": {
+ "version": "12.1.2",
+ "resolved": "https://registry.npmjs.org/expo-random/-/expo-random-12.1.2.tgz",
+ "integrity": "sha512-ajB+Mwff9PdglsyLliaU4K9BtVwKvAVVI2hQhnvlS3QgsAhHf+jQVUfAysQJHuioF6ADMEsab/kRUy4Dy03aoQ==",
+ "dependencies": {
+ "base64-js": "^1.3.0"
+ },
+ "peerDependencies": {
+ "expo": "*"
+ }
+ },
+ "node_modules/expo-secure-store": {
+ "version": "11.1.1",
+ "resolved": "https://registry.npmjs.org/expo-secure-store/-/expo-secure-store-11.1.1.tgz",
+ "integrity": "sha512-pCajYYoZbl8IORxXw83SLUsWlU6a+HmjJZP8oiSvkG1KnZ5gPepiAMRRmcFUApYXBgiOvKRGOBEUfVwmR7yO4A==",
+ "peerDependencies": {
+ "expo": "*"
+ }
+ },
"node_modules/expo-splash-screen": {
"version": "0.14.2",
"resolved": "https://registry.npmjs.org/expo-splash-screen/-/expo-splash-screen-0.14.2.tgz",
@@ -19349,6 +19411,26 @@
"url-parse": "^1.4.4"
}
},
+ "expo-auth-session": {
+ "version": "3.5.0",
+ "resolved": "https://registry.npmjs.org/expo-auth-session/-/expo-auth-session-3.5.0.tgz",
+ "integrity": "sha512-Cia1NvIu1CcKuQNbhRsSmJz1YG76wDKU0NY+FHoD/0KItKd2+//oZyjrmlJXOk4m4gVohOIGWbFzt8Xe/ReZYg==",
+ "requires": {
+ "expo-constants": "~13.0.0",
+ "expo-crypto": "~10.1.0",
+ "expo-linking": "~3.0.0",
+ "expo-web-browser": "~10.1.0",
+ "invariant": "^2.2.4",
+ "qs": "6.9.1"
+ },
+ "dependencies": {
+ "qs": {
+ "version": "6.9.1",
+ "resolved": "https://registry.npmjs.org/qs/-/qs-6.9.1.tgz",
+ "integrity": "sha512-Cxm7/SS/y/Z3MHWSxXb8lIFqgqBowP5JMlTUFyJN88y0SGQhVmZnqFK/PeuMX9LzUyWsqqhNxIyg0jlzq946yA=="
+ }
+ }
+ },
"expo-constants": {
"version": "13.0.2",
"resolved": "https://registry.npmjs.org/expo-constants/-/expo-constants-13.0.2.tgz",
@@ -19358,6 +19440,12 @@
"uuid": "^3.3.2"
}
},
+ "expo-crypto": {
+ "version": "10.1.2",
+ "resolved": "https://registry.npmjs.org/expo-crypto/-/expo-crypto-10.1.2.tgz",
+ "integrity": "sha512-TYaBtV9oK5OH+EfsAUHQkWkRPifZjCMDn6Yf9gk3/LyHdJHDYnB6NQWTJo9Qkl6vzI9svQ6PMnQTm2Yxrb3ZfQ==",
+ "requires": {}
+ },
"expo-error-recovery": {
"version": "3.0.5",
"resolved": "https://registry.npmjs.org/expo-error-recovery/-/expo-error-recovery-3.0.5.tgz",
@@ -19481,6 +19569,20 @@
"invariant": "^2.2.4"
}
},
+ "expo-random": {
+ "version": "12.1.2",
+ "resolved": "https://registry.npmjs.org/expo-random/-/expo-random-12.1.2.tgz",
+ "integrity": "sha512-ajB+Mwff9PdglsyLliaU4K9BtVwKvAVVI2hQhnvlS3QgsAhHf+jQVUfAysQJHuioF6ADMEsab/kRUy4Dy03aoQ==",
+ "requires": {
+ "base64-js": "^1.3.0"
+ }
+ },
+ "expo-secure-store": {
+ "version": "11.1.1",
+ "resolved": "https://registry.npmjs.org/expo-secure-store/-/expo-secure-store-11.1.1.tgz",
+ "integrity": "sha512-pCajYYoZbl8IORxXw83SLUsWlU6a+HmjJZP8oiSvkG1KnZ5gPepiAMRRmcFUApYXBgiOvKRGOBEUfVwmR7yO4A==",
+ "requires": {}
+ },
"expo-splash-screen": {
"version": "0.14.2",
"resolved": "https://registry.npmjs.org/expo-splash-screen/-/expo-splash-screen-0.14.2.tgz",
diff --git a/package.json b/package.json
index 01cac54..3a9397f 100644
--- a/package.json
+++ b/package.json
@@ -31,7 +31,10 @@
"react-native": "0.64.3",
"react-native-safe-area-context": "3.3.2",
"react-native-screens": "~3.10.1",
- "react-native-web": "0.17.1"
+ "react-native-web": "0.17.1",
+ "expo-auth-session": "~3.5.0",
+ "expo-random": "~12.1.1",
+ "expo-secure-store": "~11.1.0"
},
"devDependencies": {
"@babel/core": "^7.12.9",
diff --git a/screens/AuthScreen.tsx b/screens/AuthScreen.tsx
new file mode 100644
index 0000000..4cb9955
--- /dev/null
+++ b/screens/AuthScreen.tsx
@@ -0,0 +1,34 @@
+import * as React from 'react';
+import * as WebBrowser from 'expo-web-browser';
+import * as Google from 'expo-auth-session/providers/google';
+import { Button } from 'react-native';
+import {createContext, useState} from "react";
+
+WebBrowser.maybeCompleteAuthSession();
+
+export default function AuthScreen({authCallback} ) {
+ const [request, response, promptAsync] = Google.useAuthRequest({
+ expoClientId: '61386079886-2k3g6793pgt5pha4rhdojpvgrkuccfj7.apps.googleusercontent.com',
+ iosClientId: '61386079886-2k3g6793pgt5pha4rhdojpvgrkuccfj7.apps.googleusercontent.com',
+ androidClientId: '61386079886-2k3g6793pgt5pha4rhdojpvgrkuccfj7.apps.googleusercontent.com',
+ webClientId: '61386079886-2k3g6793pgt5pha4rhdojpvgrkuccfj7.apps.googleusercontent.com',
+ });
+ const AuthContext = useState()
+ React.useEffect(() => {
+ if (response?.type === 'success') {
+ const { authentication } = response;
+ // @ts-ignore
+ authCallback(authentication)
+ }
+ }, [response]);
+
+ return (
+