CkAuthConfig<TProfile> class
Main auth configuration for CkAuthService.
Set on CoreKitConfig.authConfig. When non-null, CoreKit initializes CkAuthService, wires CkTransport token refresh, and restores session on launch.
Profile parsing is handled entirely through extractors — use CkAuthExtractors.profile for API responses and cold-start restore.
Constructors
-
CkAuthConfig({required CkAuthEndpoints endpoints, CkLoginRequest loginRequestBuilder(LoginCallback loginCallBack)?, @Deprecated('Use loginRequestBuilder instead. Will be removed in v2.0.0.') Map<
String, dynamic> loginBodyBuilder(LoginCallback loginCallBack)?, Map<String, String> ? signupHeadersBuilder(String? verificationToken)?, CkAuthExtractors? extractors, CkAuthFlowHandlers? handlers, required CkOtpConfig otpConfig, CkSocialLoginConfig? socialLoginConfig, Future<void> onTokenRestored()?, Future<bool> customAuthValidator()?, bool? mockAuth})
Properties
-
customAuthValidator
→ Future<
bool> Function()? -
final
- endpoints → CkAuthEndpoints
-
final
- extractors → CkAuthExtractors
-
Non-generic extractors for tokens, profile, verification tokens, and messages.
Profile parsing is handled here via CkAuthExtractors.profile.
final
- handlers → CkAuthFlowHandlers?
-
final
- hashCode → int
-
The hash code for this object.
no setterinherited
-
loginBodyBuilder
→ Map<
String, dynamic> Function(LoginCallback loginCallBack)? -
Deprecated — use loginRequestBuilder instead.
final
- loginRequestBuilder → CkLoginRequest Function(LoginCallback loginCallBack)?
-
Canonical login request builder returning CkLoginRequest.
final
- mockAuth → bool
-
When true, all auth API calls are bypassed and mocked internally.
Use this to design and test UI flows without a real backend.
no setter
-
onTokenRestored
→ Future<
void> Function()? -
final
- otpConfig → CkOtpConfig
-
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
-
signupHeadersBuilder
→ Map<
String, String> ? Function(String? verificationToken)? -
Optional header builder called during signUp() with the active verification token.
final
-
final
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
resolveLoginRequest(
LoginCallback callback, {Map< String, String> ? headers}) → CkLoginRequest -
Resolves a CkLoginRequest from a LoginCallback using loginRequestBuilder
or legacy loginBodyBuilder, merging optional extra
headersif provided. -
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited