diff --git a/Gemfile.lock b/Gemfile.lock index 7c8b3a2d8..2298ad900 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -26,16 +26,16 @@ GEM ast (2.4.2) atomos (0.1.3) aws-eventstream (1.3.0) - aws-partitions (1.996.0) - aws-sdk-core (3.211.0) + aws-partitions (1.1022.0) + aws-sdk-core (3.214.0) aws-eventstream (~> 1, >= 1.3.0) aws-partitions (~> 1, >= 1.992.0) aws-sigv4 (~> 1.9) jmespath (~> 1, >= 1.6.1) - aws-sdk-kms (1.95.0) + aws-sdk-kms (1.96.0) aws-sdk-core (~> 3, >= 3.210.0) aws-sigv4 (~> 1.5) - aws-sdk-s3 (1.169.0) + aws-sdk-s3 (1.176.1) aws-sdk-core (~> 3, >= 3.210.0) aws-sdk-kms (~> 1) aws-sigv4 (~> 1.5) @@ -125,7 +125,7 @@ GEM faraday_middleware (1.2.1) faraday (~> 1.0) fastimage (2.3.1) - fastlane (2.225.0) + fastlane (2.226.0) CFPropertyList (>= 2.3, < 4.0.0) addressable (>= 2.8, < 3.0.0) artifactory (~> 3.0) @@ -165,7 +165,7 @@ GEM tty-spinner (>= 0.8.0, < 1.0.0) word_wrap (~> 1.0.0) xcodeproj (>= 1.13.0, < 2.0.0) - xcpretty (~> 0.3.0) + xcpretty (~> 0.4.0) xcpretty-travis-formatter (>= 0.0.3, < 2.0.0) ffi (1.17.0) fourflusher (2.3.1) @@ -208,13 +208,13 @@ GEM os (>= 0.9, < 2.0) signet (>= 0.16, < 2.a) highline (2.0.3) - http-cookie (1.0.7) + http-cookie (1.0.8) domain_name (~> 0.5) httpclient (2.8.3) i18n (1.14.6) concurrent-ruby (~> 1.0) jmespath (1.6.2) - json (2.7.5) + json (2.9.0) jwt (2.9.3) base64 language_server-protocol (3.17.0.3) @@ -233,7 +233,7 @@ GEM nokogiri (1.15.6) mini_portile2 (~> 2.8.2) racc (~> 1.4) - optparse (0.5.0) + optparse (0.6.0) os (1.1.4) parallel (1.26.3) parser (3.3.6.0) @@ -251,7 +251,7 @@ GEM uber (< 0.2.0) retriable (3.1.2) rexml (3.3.9) - rouge (2.0.7) + rouge (3.28.0) rubocop (1.68.0) json (~> 2.3) language_server-protocol (>= 3.17.0) @@ -299,8 +299,8 @@ GEM colored2 (~> 3.1) nanaimo (~> 0.4.0) rexml (>= 3.3.6, < 4.0) - xcpretty (0.3.0) - rouge (~> 2.0.7) + xcpretty (0.4.0) + rouge (~> 3.28.0) xcpretty-travis-formatter (1.0.1) xcpretty (~> 0.2, >= 0.0.7) diff --git a/src/components/LoginSignUp/LoginForm.tsx b/src/components/LoginSignUp/LoginForm.tsx index 279d112b7..49e4f2ecb 100644 --- a/src/components/LoginSignUp/LoginForm.tsx +++ b/src/components/LoginSignUp/LoginForm.tsx @@ -1,4 +1,4 @@ -import { appleAuth, AppleButton } from "@invertase/react-native-apple-authentication"; +import { appleAuth, AppleButton, AppleError } from "@invertase/react-native-apple-authentication"; import { RouteProp, useNavigation, useRoute } from "@react-navigation/native"; import classnames from "classnames"; import { @@ -42,6 +42,10 @@ type ParamList = { LoginFormParams: LoginFormParams } +interface AppleAuthError { + code: AppleError; +} + const APPLE_BUTTON_STYLE = { maxWidth: 500, height: 45, // You must specify a height @@ -68,6 +72,10 @@ async function signInWithApple( realm: Realm ) { requestedScopes: [appleAuth.Scope.FULL_NAME, appleAuth.Scope.EMAIL] } ); } catch ( appleAuthRequestError ) { + if ( ( appleAuthRequestError as AppleAuthError ).code === appleAuth.Error.CANCELED ) { + // The user canceled sign in, no need to log + return false; + } logger.error( "Apple auth request failed", appleAuthRequestError ); showSignInWithAppleFailed(); return false;