CkAuthConfig<TProfile> constructor

CkAuthConfig<TProfile>({
  1. required CkAuthEndpoints endpoints,
  2. CkLoginRequest loginRequestBuilder(
    1. LoginCallback loginCallBack
    )?,
  3. @Deprecated('Use loginRequestBuilder instead. Will be removed in v2.0.0.') Map<String, dynamic> loginBodyBuilder(
    1. LoginCallback loginCallBack
    )?,
  4. Map<String, String>? signupHeadersBuilder(
    1. String? verificationToken
    )?,
  5. CkAuthExtractors? extractors,
  6. CkAuthFlowHandlers? handlers,
  7. required CkOtpConfig otpConfig,
  8. CkSocialLoginConfig? socialLoginConfig,
  9. Future<void> onTokenRestored()?,
  10. Future<bool> customAuthValidator()?,
  11. bool? mockAuth,
})

Implementation

CkAuthConfig({
  required this.endpoints,
  this.loginRequestBuilder,

  @Deprecated('Use loginRequestBuilder instead. Will be removed in v2.0.0.')
  this.loginBodyBuilder,
  this.signupHeadersBuilder,
  CkAuthExtractors? extractors,
  this.handlers,
  required this.otpConfig,
  this.socialLoginConfig,
  this.onTokenRestored,
  this.customAuthValidator,
  bool? mockAuth,
}) : _mockAuth = mockAuth,
     extractors = extractors ?? CkAuthExtractors.standard(),
     assert(
       loginRequestBuilder != null || loginBodyBuilder != null,
       'Either loginRequestBuilder or loginBodyBuilder must be provided.',
     );