Skip to content

Commit

Permalink
Merge branch 'main' into 2500-size-language-issues-with-2-buttons-sid…
Browse files Browse the repository at this point in the history
…e-by-side
  • Loading branch information
angielt committed Dec 17, 2024
2 parents 2d996f6 + b8ca839 commit 54d4508
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 13 deletions.
24 changes: 12 additions & 12 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -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)
Expand Down Expand Up @@ -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)
Expand Down Expand Up @@ -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)
Expand All @@ -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)
Expand All @@ -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)
Expand Down Expand Up @@ -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)

Expand Down
10 changes: 9 additions & 1 deletion src/components/LoginSignUp/LoginForm.tsx
Original file line number Diff line number Diff line change
@@ -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 {
Expand Down Expand Up @@ -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
Expand All @@ -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;
Expand Down

0 comments on commit 54d4508

Please sign in to comment.