feat: add role-based authentication support and update UI toggle label to Agent
This commit is contained in:
@@ -135,6 +135,7 @@ class AuthNotifier extends StateNotifier<AuthState> {
|
||||
Future<void> login({
|
||||
required String email,
|
||||
required String password,
|
||||
String? loginRole,
|
||||
}) async {
|
||||
state = state.copyWith(
|
||||
status: AuthStatus.loading,
|
||||
@@ -146,6 +147,7 @@ class AuthNotifier extends StateNotifier<AuthState> {
|
||||
final result = await _repository.login(
|
||||
email: email,
|
||||
password: password,
|
||||
loginRole: loginRole,
|
||||
);
|
||||
|
||||
if (result['requiresTwoFactor'] == true) {
|
||||
|
||||
Reference in New Issue
Block a user