Skip to content

generic login flow implemeneted #2

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions android/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -136,6 +136,7 @@ android {
targetSdkVersion rootProject.ext.targetSdkVersion
versionCode 1
versionName "1.0"
manifestPlaceholders = [auth0Domain: "dev-4ir78alb.us.auth0.com", auth0Scheme: "${applicationId}"]
}
splits {
abi {
Expand Down
7 changes: 7 additions & 0 deletions ios/chefnotebook/AppDelegate.m
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
#import <FlipperKitNetworkPlugin/FlipperKitNetworkPlugin.h>
#import <SKIOSNetworkPlugin/SKIOSNetworkAdapter.h>
#import <FlipperKitReactPlugin/FlipperKitReactPlugin.h>
#import <React/RCTLinkingManager.h>

static void InitializeFlipper(UIApplication *application) {
FlipperClient *client = [FlipperClient sharedClient];
Expand All @@ -25,6 +26,12 @@ static void InitializeFlipper(UIApplication *application) {

@implementation AppDelegate

- (BOOL)application:(UIApplication *)app openURL:(NSURL *)url
options:(NSDictionary<UIApplicationOpenURLOptionsKey, id> *)options
{
return [RCTLinkingManager application:app openURL:url options:options];
}

- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
{
#ifdef FB_SONARKIT_ENABLED
Expand Down
13 changes: 13 additions & 0 deletions ios/chefnotebook/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,19 @@
<string>1.0</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleURLTypes</key>
<array>
<dict>
<key>CFBundleTypeRole</key>
<string>None</string>
<key>CFBundleURLName</key>
<string>auth0</string>
<key>CFBundleURLSchemes</key>
<array>
<string>$(PRODUCT_BUNDLE_IDENTIFIER)</string>
</array>
</dict>
</array>
<key>CFBundleVersion</key>
<string>1</string>
<key>LSRequiresIPhoneOS</key>
Expand Down
137 changes: 137 additions & 0 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 3 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,12 @@
"@react-navigation/bottom-tabs": "^5.11.15",
"@react-navigation/native": "^5.9.8",
"@react-navigation/stack": "^5.14.9",
"@types/auth0-js": "^9.14.5",
"lodash": "^4.17.21",
"react": "17.0.2",
"react-hook-form": "^7.22.5",
"react-native": "0.66.4",
"react-native-auth0": "^2.12.0",
"react-native-gesture-handler": "^2.1.0",
"react-native-reanimated": "^2.2.4",
"react-native-safe-area-context": "^3.3.2",
Expand All @@ -32,6 +34,7 @@
"@react-native-community/eslint-config": "^2.0.0",
"@types/jest": "^26.0.23",
"@types/react-native": "^0.66.4",
"@types/react-native-auth0": "^2.10.0",
"@types/react-test-renderer": "^17.0.1",
"@typescript-eslint/eslint-plugin": "^5.7.0",
"@typescript-eslint/parser": "^5.7.0",
Expand Down
10 changes: 9 additions & 1 deletion src/screens/Home.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,15 @@ const Home: FC<Props> = () => {
navigation.addListener('beforeRemove', (e)=> {
e.preventDefault()
if(isFocused) {
BackHandler.exitApp()
Alert.alert(
'Exit App',
'Do you want to exit?',
[
{text: 'No', onPress: () => console.log('Cancel Pressed'), style: 'cancel'},
{text: 'Yes', onPress: () => BackHandler.exitApp()},
],
{ cancelable: false });
return true;
}
})
}, [navigation])
Expand Down
Loading