feat: improve patient flow and pricing workflow
This commit is contained in:
@@ -8,8 +8,14 @@ class AuthRepository {
|
||||
static final instance = AuthRepository._();
|
||||
|
||||
PocketBase get _pb => PocketBaseClient.instance.pb;
|
||||
PocketBaseClient get _client => PocketBaseClient.instance;
|
||||
|
||||
Future<AuthResult> login(String email, String password) async {
|
||||
Future<AuthResult> login(
|
||||
String email,
|
||||
String password, {
|
||||
required bool rememberSession,
|
||||
}) async {
|
||||
await _client.setRememberSession(rememberSession);
|
||||
await _pb.collection('users').authWithPassword(email, password);
|
||||
return _buildAuthResult();
|
||||
}
|
||||
@@ -43,7 +49,11 @@ class AuthRepository {
|
||||
if (firstName != null && firstName.isNotEmpty) 'first_name': firstName,
|
||||
if (lastName != null && lastName.isNotEmpty) 'last_name': lastName,
|
||||
});
|
||||
return login(email, password);
|
||||
return login(
|
||||
email,
|
||||
password,
|
||||
rememberSession: _client.rememberSession,
|
||||
);
|
||||
}
|
||||
|
||||
Future<AuthResult> refreshSession() async {
|
||||
|
||||
Reference in New Issue
Block a user