👽 Support new authorized device
This commit is contained in:
@@ -19,14 +19,12 @@ sealed class SnAuthChallenge with _$SnAuthChallenge {
|
||||
required int stepRemain,
|
||||
required int stepTotal,
|
||||
required int failedAttempts,
|
||||
required int platform,
|
||||
required int type,
|
||||
required List<String> blacklistFactors,
|
||||
required List<dynamic> audiences,
|
||||
required List<dynamic> scopes,
|
||||
required String ipAddress,
|
||||
required String userAgent,
|
||||
required String deviceId,
|
||||
required String? nonce,
|
||||
required String? location,
|
||||
required String accountId,
|
||||
@@ -76,22 +74,6 @@ sealed class SnAuthFactor with _$SnAuthFactor {
|
||||
_$SnAuthFactorFromJson(json);
|
||||
}
|
||||
|
||||
@freezed
|
||||
sealed class SnAuthDevice with _$SnAuthDevice {
|
||||
const factory SnAuthDevice({
|
||||
required dynamic label,
|
||||
required String userAgent,
|
||||
required String deviceId,
|
||||
required int platform,
|
||||
required List<SnAuthSession> sessions,
|
||||
// Not from backend, used for UI
|
||||
@Default(false) bool isCurrent,
|
||||
}) = _SnAuthDevice;
|
||||
|
||||
factory SnAuthDevice.fromJson(Map<String, dynamic> json) =>
|
||||
_$SnAuthDeviceFromJson(json);
|
||||
}
|
||||
|
||||
@freezed
|
||||
sealed class SnAccountConnection with _$SnAccountConnection {
|
||||
const factory SnAccountConnection({
|
||||
|
Reference in New Issue
Block a user