In my app I use this code to send reset email link to user email:
Future<BaseResponse<bool, BaseError>> sendResetPasswordLink(
String email,
) async {
try {
// await _auth.sendPasswordResetLink(email);
var acs = ActionCodeSettings(
// URL you want to redirect back to.
// URL must be whitelisted in the Firebase Console.
url: 'example',
// dynamicLinkDomain: 'example',
// Must be true for app handling
handleCodeInApp: true,
androidMinimumVersion: '1',
androidPackageName: 'com.example.app',
iOSBundleId: 'com.example.app',
);
await FirebaseAuth.instance
.sendPasswordResetEmail(email: email, actionCodeSettings: acs);
return BaseResponsepleted(
true,
);
} catch (e) {
return BaseResponse.error(BaseError(message: 'unknown error'));
}
}
I don't want to use firebase dynamic links for redirecting to my app. Is there any way to do this redirection without FDL?
In my app I use this code to send reset email link to user email:
Future<BaseResponse<bool, BaseError>> sendResetPasswordLink(
String email,
) async {
try {
// await _auth.sendPasswordResetLink(email);
var acs = ActionCodeSettings(
// URL you want to redirect back to.
// URL must be whitelisted in the Firebase Console.
url: 'example',
// dynamicLinkDomain: 'example',
// Must be true for app handling
handleCodeInApp: true,
androidMinimumVersion: '1',
androidPackageName: 'com.example.app',
iOSBundleId: 'com.example.app',
);
await FirebaseAuth.instance
.sendPasswordResetEmail(email: email, actionCodeSettings: acs);
return BaseResponse.completed(
true,
);
} catch (e) {
return BaseResponse.error(BaseError(message: 'unknown error'));
}
}
I don't want to use firebase dynamic links for redirecting to my app. Is there any way to do this redirection without FDL?
Dynamic links are not required for password reset to function. You can just send the email without a continue URL
, let the user click the link, reset the password in the web page, and stay there.
Alternatively you can pass a continue URL
, but that doesn't have to point to Firebase Dynamic Links. You can pass any URL you like, including one that you handle yourself without Firebase Dynamic Links.