Im trying to do the email authentication of firebase. I'm following the document and i get this error:
UNAUTHORIZED_DOMAIN:Domain not whitelisted by project
I saw this soultion: Firebase Auth/unauthorized domain. Domain is not authorized
and it didn't work, so I went and tried to create a dynamic link because I saw here that I need to create dynamic link: Firebase says "Domain not whitelisted" for a link that is whitelisted
and that also didn't work. i got when tried to create dynamic link:
An error occurred when creating a new Dynamic Link
so i went and tried this: Firebase console create dynamic link error
and still the same problem
so now I don't know what else to do.
the code:
private void sendEmail(String email) {
Log.d(TAG, "sendEmail: here in sendEmail");
String url = "https://.........";
ActionCodeSettings actionCodeSettings = ActionCodeSettings.newBuilder().setUrl(url)
.setHandleCodeInApp(true)
.setAndroidPackageName("com.myapp_pack.my_app_name", true, "12").build();
auth.sendSignInLinkToEmail(email, actionCodeSettings).addOnCompleteListener(new OnCompleteListener<Void>() {
@Override
public void onComplete(@NonNull Task<Void> task) {
if (task.isSuccessful()) {
Log.d(TAG, "onComplete: email sent homie!");
} else{
Log.d(TAG, "onComplete: task failed " + task.getException().getMessage());
}
}
});
}