Add Sign in with Apple sorta
This commit is contained in:
		@@ -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);
 | 
				
			||||||
      }
 | 
					      }
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -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
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -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);
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user