Enhance Google and Apple sign-up methods to include name and firstname parameters

This commit is contained in:
Van Leemput Dayron
2025-11-06 11:28:18 +01:00
parent fa7daca50a
commit 75bdf591f3
6 changed files with 205 additions and 75 deletions

View File

@@ -171,7 +171,11 @@ class AuthBloc extends Bloc<AuthEvent, AuthState> {
// This method can be implemented if needed for Google sign-up specific logic.
emit(AuthLoading());
try {
final user = await _authRepository.signUpWithGoogle(event.phoneNumber);
final user = await _authRepository.signUpWithGoogle(
event.phoneNumber,
event.name,
event.firstname,
);
if (user != null) {
emit(AuthAuthenticated(user: user));
@@ -190,7 +194,11 @@ class AuthBloc extends Bloc<AuthEvent, AuthState> {
// This method can be implemented if needed for Apple sign-up specific logic.
emit(AuthLoading());
try {
final user = await _authRepository.signUpWithApple(event.phoneNumber);
final user = await _authRepository.signUpWithApple(
event.phoneNumber,
event.name,
event.firstname,
);
if (user != null) {
emit(AuthAuthenticated(user: user));