Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Getting error "Invalid Dynamic Link - Blocked" error when user selects Login link

I'm trying to implement email sign-in without password, as per the instructions on this page and when the recipient selects the link in the login message, they see the following message:

enter image description here I don't get this. The domain pento-2a27b.firebaseapp.com IS whitelisted, since it's already included in the list of authorized domains:

enter image description here

as is the dynamic link:

enter image description here

enter image description here

so what's Firebase complaining about?I tried sending the link both with and without the path component 'signintoapp' and got the same result.

BTW, the relevant parts of my code look like the following:

        final ActionCodeSettings actionCodeSettings =
            ActionCodeSettings.newBuilder()
                    // URL you want to redirect back to. The domain (www.example.com) for this
                    // URL must be whitelisted in the Firebase Console.
                    .setUrl("https://pento-2a27b.firebaseapp.com")
                    // This must be true
                    .setHandleCodeInApp(true)
                    .setAndroidPackageName(
                            "com.chiaramail.pento",
                            true, /* installIfNotAvailable */
                            "140"    /* minimumVersion */)
                    .build();

and

        alertContinue.setOnClickListener(new View.OnClickListener() {
        @Override
        public void onClick(View v) {
            mAuth.sendSignInLinkToEmail(emailAddress.getText().toString(), actionCodeSettings)
                    .addOnCompleteListener(new OnCompleteListener<Void>() {
                        @Override
                        public void onComplete(@NonNull Task<Void> task) {
                            if (task.isSuccessful()) {
                                Log.d(TAG, "Email sent.");
                                signinAlert.dismiss();
                                settings = getSharedPreferences("Five-to-Go settings", Context.MODE_PRIVATE);
                                SharedPreferences.Editor editor = settings.edit();
                                editor.putString("EMAIL", emailAddress.getText().toString());
                                editor.commit();

                                Toast.makeText(LoginActivity.this, getString(R.string.email_confirmation_sent),
                                        Toast.LENGTH_LONG).show();
                            }
                        }
                    });
        }
    });
like image 834
FractalBob Avatar asked May 03 '26 09:05

FractalBob


1 Answers

This is related to Dynamic Links whitelisting and not authorized domain or continue URL whitelisting. Learn more about whitelisting dynamic links.

You need to match the pattern of the dynamic link that Firebase Auth constructs.

like image 70
bojeil Avatar answered May 06 '26 01:05

bojeil



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!