diff --git a/app/lib/util/api/user_api.dart b/app/lib/util/api/user_api.dart index 9624d8b12..0a696667c 100644 --- a/app/lib/util/api/user_api.dart +++ b/app/lib/util/api/user_api.dart @@ -195,6 +195,11 @@ class UserGateway implements UserGatewayAuthentifcation { return; } + @override + Future sendVerificationEmail() async { + await authUser!.firebaseUser.sendEmailVerification(); + } + Future deleteUser(SharezoneGateway gateway) async { if (await hasInternetAccess()) { final currentUser = references.firebaseAuth!.currentUser!; diff --git a/lib/authentification/authentification_base/lib/src/gateways/link_provider_gateway.dart b/lib/authentification/authentification_base/lib/src/gateways/link_provider_gateway.dart index fa6eb4d4f..70f2b7d87 100644 --- a/lib/authentification/authentification_base/lib/src/gateways/link_provider_gateway.dart +++ b/lib/authentification/authentification_base/lib/src/gateways/link_provider_gateway.dart @@ -45,6 +45,7 @@ class LinkProviderGateway extends BlocBase { final credential = EmailAuthProvider.credential(email: email, password: password); await userGateway.linkWithCredential(credential); + await userGateway.sendVerificationEmail(); _analytics.logEmailAndPasswordLink(); diff --git a/lib/authentification/authentification_base/lib/src/gateways/user_gateway_authentifcation.dart b/lib/authentification/authentification_base/lib/src/gateways/user_gateway_authentifcation.dart index 21612caf6..589376bd7 100644 --- a/lib/authentification/authentification_base/lib/src/gateways/user_gateway_authentifcation.dart +++ b/lib/authentification/authentification_base/lib/src/gateways/user_gateway_authentifcation.dart @@ -10,4 +10,5 @@ import 'package:firebase_auth/firebase_auth.dart'; abstract class UserGatewayAuthentifcation { Future linkWithCredential(AuthCredential credential); + Future sendVerificationEmail(); }