persist login securely
This commit is contained in:
parent
c3376bf780
commit
111a875529
6 changed files with 394 additions and 15 deletions
17
lib/models/session_backup.dart
Normal file
17
lib/models/session_backup.dart
Normal file
|
|
@ -0,0 +1,17 @@
|
|||
import "package:freezed_annotation/freezed_annotation.dart";
|
||||
part "session_backup.freezed.dart";
|
||||
part "session_backup.g.dart";
|
||||
|
||||
@freezed
|
||||
abstract class SessionBackup with _$SessionBackup {
|
||||
const factory SessionBackup({
|
||||
required String accessToken,
|
||||
required Uri homeserver,
|
||||
required String userID,
|
||||
required String deviceID,
|
||||
required String deviceName,
|
||||
}) = _SessionBackup;
|
||||
|
||||
factory SessionBackup.fromJson(Map<String, Object?> json) =>
|
||||
_$SessionBackupFromJson(json);
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue