Skip to content

Commit 2971183

Browse files
committed
feat(authentication): pass isDashboardLogin flag in auth bloc
This change updates the AuthenticationBloc to pass the 'isDashboardLogin: true' flag when calling the authentication repository. This aligns the dashboard with the updated HtAuthClient contract, which requires this flag to differentiate dashboard-specific login flows.
1 parent 1c56895 commit 2971183

File tree

1 file changed

+9
-2
lines changed

1 file changed

+9
-2
lines changed

lib/authentication/bloc/authentication_bloc.dart

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,10 @@ class AuthenticationBloc
6565
}
6666
emit(AuthenticationRequestCodeLoading());
6767
try {
68-
await _authenticationRepository.requestSignInCode(event.email);
68+
await _authenticationRepository.requestSignInCode(
69+
event.email,
70+
isDashboardLogin: true,
71+
);
6972
emit(AuthenticationCodeSentSuccess(email: event.email));
7073
} on InvalidInputException catch (e) {
7174
emit(AuthenticationFailure('Invalid input: ${e.message}'));
@@ -95,7 +98,11 @@ class AuthenticationBloc
9598
) async {
9699
emit(AuthenticationLoading());
97100
try {
98-
await _authenticationRepository.verifySignInCode(event.email, event.code);
101+
await _authenticationRepository.verifySignInCode(
102+
event.email,
103+
event.code,
104+
isDashboardLogin: true,
105+
);
99106
// On success, the _AuthenticationUserChanged listener will handle
100107
// emitting AuthenticationAuthenticated.
101108
} on InvalidInputException catch (e) {

0 commit comments

Comments
 (0)