isSignupMethodAvailable method

bool isSignupMethodAvailable(
  1. SignupMethod signupMethod,
  2. AuthState authState
)

Checks if a specific signup method is available for the given authentication state.

Implementation

bool isSignupMethodAvailable(SignupMethod signupMethod, AuthState authState) {
  if (authState.stage != AuthStage.signup) {
    return false;
  }

  switch (signupMethod) {
    case SignupMethod.passkey:
      return authState.passkeyId != null;
    case SignupMethod.password:
      return authState.passwordUrl != null;
  }
}