AuthResponse.tokenOnly constructor

AuthResponse.tokenOnly({
  1. required String accessToken,
  2. String? refreshToken,
  3. String tokenType = 'Bearer',
  4. int? expiresIn,
  5. int? refreshExpiresIn,
})

Creates a token-only response (for refresh operations)

Implementation

factory AuthResponse.tokenOnly({
  required String accessToken,
  String? refreshToken,
  String tokenType = 'Bearer',
  int? expiresIn,
  int? refreshExpiresIn,
}) {
  return AuthResponse(
    user: {},
    accessToken: accessToken,
    refreshToken: refreshToken,
    tokenType: tokenType,
    expiresIn: expiresIn,
    refreshExpiresIn: refreshExpiresIn,
  );
}