Add register and sign up with supertokens

This commit is contained in:
2024-07-23 11:39:21 +02:00
parent b2d5369387
commit 5dd6a70329
24 changed files with 846 additions and 228 deletions

View File

@@ -2,28 +2,31 @@
class AppUser {
final int idusers;
final String email;
final int docOffice_id;
final int docOffice_ID;
final String fname;
final String lname;
final String title;
final String app_id;
const AppUser(
this.idusers,
this.email,
this.docOffice_id,
this.docOffice_ID,
this.fname,
this.lname,
this.title,
this.app_id,
);
factory AppUser.fromJson(dynamic json) {
return AppUser(
json['idusers'],
json['email'],
json['docOffice_id'],
json['docOffice_ID'],
json['fname'],
json['lname'],
json['title'],
json['app_id'],
);
}
}

View File

@@ -0,0 +1,23 @@
class SessionST {
final String status;
final bool exists;
const SessionST({
required this.status,
required this.exists,
});
factory SessionST.fromJson(Map<String, dynamic> json) {
return switch (json) {
{
'status': String status,
'exists': bool exists,
} =>
SessionST(
status: status,
exists: exists,
),
_ => throw const FormatException('Failed to load SessionST.'),
};
}
}