Add Sign in with Apple sorta

This commit is contained in:
Gabriel Brown 2025-03-05 12:58:41 -06:00
parent c62926b8f2
commit 708c0553f5
4 changed files with 29 additions and 37 deletions

View File

@ -72,8 +72,8 @@ const AppleSignIn: React.FC<AppleSignInProps> = ({
options: { options: {
data: { data: {
full_name: name, full_name: name,
} },
} },
}); });
if (signUpError) { if (signUpError) {
@ -82,7 +82,6 @@ const AppleSignIn: React.FC<AppleSignInProps> = ({
// User created successfully // User created successfully
onSignInComplete?.(); onSignInComplete?.();
} catch (error) { } catch (error) {
console.error('Apple sign in error:', error); console.error('Apple sign in error:', error);
@ -91,7 +90,7 @@ const AppleSignIn: React.FC<AppleSignInProps> = ({
} else { } else {
Alert.alert( Alert.alert(
'Sign in error', 'Sign in error',
'An error occurred while signing in with Apple. Please try again.' 'An error occurred while signing in with Apple. Please try again.',
); );
onSignInError?.(error); onSignInError?.(error);
} }

View File

@ -31,8 +31,9 @@ const ThemedTextInput: React.FC<ThemedTextInputProps> = ({
{ {
width, width,
height, height,
borderColor: Colors[scheme].accent }, borderColor: Colors[scheme].accent,
containerStyle, },
containerStyle,
]} ]}
> >
<TextInput <TextInput

View File

@ -28,18 +28,10 @@ const config = {
teamId: process.env.APPLE_TEAM_ID || '', teamId: process.env.APPLE_TEAM_ID || '',
clientId: process.env.AUTH_APPLE_ID || '', clientId: process.env.AUTH_APPLE_ID || '',
keyId: process.env.APPLE_KEY_ID || '', keyId: process.env.APPLE_KEY_ID || '',
privateKeyPath: path.resolve( privateKeyPath: path.resolve(__dirname, process.env.APPLE_PRIVATE_KEY_PATH || ''),
__dirname,
process.env.APPLE_PRIVATE_KEY_PATH || '',
),
}; };
if ( if (!config.teamId || !config.clientId || !config.keyId || !config.privateKeyPath) {
!config.teamId ||
!config.clientId ||
!config.keyId ||
!config.privateKeyPath
) {
console.error('Missing necessary Apple configuration'); console.error('Missing necessary Apple configuration');
process.exit(1); process.exit(1);
} }