fromJson static method

AuthResponse fromJson(
  1. dynamic json
)

Implementation

static AuthResponse fromJson(dynamic json) {
  if (json['mfa'] == true) {
    return AuthResponse(mfa: MultiFactorAuthenticationInfo.fromJson(json));
  } else {
    final session = Session.fromJson(json);
    return AuthResponse(session: session, user: session.user);
  }
}