I'm currently on debug mode and run my app on my device.
I'm using sign_in_with apple and this code
Future<FirebaseUser> signInWithApple() async {
var redirectURL = "https://SERVER_AS_PER_THE_DOCS.glitch.me/callbacks/sign_in_with_apple";
var clientID = "AS_PER_THE_DOCS";
final appleIdCredential = await SignInWithApple.getAppleIDCredential(
scopes: [
AppleIDAuthorizationScopes.email,
AppleIDAuthorizationScopes.fullName,
],
webAuthenticationOptions: WebAuthenticationOptions(
clientId: clientID,
redirectUri: Uri.parse(
redirectURL)));
final oAuthProvider = OAuthProvider(providerId: 'apple.com');
final credential = oAuthProvider.getCredential(
idToken: appleIdCredential.identityToken,
accessToken: appleIdCredential.authorizationCode,
);
final authResult =
await SignInUtil.firebaseAuth.signInWithCredential(credential);
return authResult.user; }
But after I sign in on chrome it redirects to my app on playstore and when I try to open the app the logs says:
E/flutter (19796): [ERROR:flutter/lib/ui/ui_dart_state.cc(199)] Unhandled Exception: SignInWithAppleAuthorizationError(AuthorizationErrorCode.canceled, The user closed the Custom Tab)
E/flutter (19796): #0 SignInWithApple._signInWithAppleAndroid (package:sign_in_with_apple/src/sign_in_with_apple.dart:239:7)
E/flutter (19796): <asynchronous suspension>
Am I missing something that I forgot to add?