signInWithYahoo static method

Future<User?> signInWithYahoo(
  1. BuildContext context, {
  2. dynamic onError(
    1. String
    )?,
  3. dynamic onSignInSuccessful(
    1. User
    )?,
})

Initiates a Yahoo OAuth SignUp Flow based on the OAuthEngine Implementation

context is necessary

onError is a callback that is invoked when an error is encountered

onSignInSuccessful is a callback that is invoked when the signIn is successful. It provides a User which you can use to perform other actions.

Implementation

static Future<User?> signInWithYahoo(
  BuildContext context, {
  Function(String)? onError,
  Function(User)? onSignInSuccessful,
}) async {
  final provider = Provider.of<FireAuthProvider>(context, listen: false);
  return await provider.signInWithYahoo(
    onError: onError,
    onSignInSuccessful: onSignInSuccessful,
  );
}