Reputation: 18943
From quickstart-android samples projects I'm trying the Firebase Auth Quickstart sample targeting the Passwordless method with these versions:
// Firebase Authentication
implementation 'com.google.firebase:firebase-auth:16.0.2'
implementation 'com.google.firebase:firebase-core:16.0.0'
// Google Sign In SDK (only required for Google Sign In)
implementation 'com.google.android.gms:play-services-auth:15.0.1'
// Firebase UI
// Used in FirebaseUIActivity.
implementation 'com.firebaseui:firebase-ui-auth:4.0.0'
I've followed the setup as documented in the project README but I get the following error (Logcat):
06-25 10:51:31.603 3657-3657/com.google.firebase.quickstart.auth W/PasswordlessSignIn: Could not send link
com.google.firebase.FirebaseException: An internal error has occurred. [ UNAUTHORIZED_DOMAIN:Domain not whitelisted by project ]
at com.google.firebase.auth.api.internal.zzce.zzb(Unknown Source:55)
The Firebase->Authentication->Authorized domain
table contains <my-project-name>.firebaseapp.com
as authorized domain.
What am I missing?
Upvotes: 3
Views: 3016
Reputation: 788
Now you need to go Authentication->Settings->Authorized domains
. And add the domain of your dynamic link. It must start with www
, e.g: www.example.page.link
Upvotes: 2
Reputation: 1377
Upvotes: 2
Reputation: 93
For me, it works using this method:
ActionCodeSettings settings = ActionCodeSettings
.newBuilder()
.setUrl("https://auth.example.com/emailSignInLink")
Set Authorized domains in the console too: auth.example.com
Upvotes: 0
Reputation: 1777
First make sure that you already add domain 'yourdomain.com' to Authentication menu in Firebase at Authorized domains. If you already have your domain declared there, assuming that you are using:
compileSdkVersion 27
buildToolsVersion '27.0.3'
defaultConfig {
minSdkVersion 16
targetSdkVersion 27
}
Try to update to the latest version like:
// Firebase Authentication
implementation 'com.google.firebase:firebase-auth:16.0.2'
implementation 'com.google.firebase:firebase-core:16.0.1'
// Google Sign In SDK (only required for Google Sign In)
implementation 'com.google.android.gms:play-services-auth:15.0.1'
// Firebase UI
// Used in FirebaseUIActivity.
implementation 'com.firebaseui:firebase-ui-auth:4.0.1'
Also make sure that you are using:
implementation "com.android.support:design:27.1.1"
implementation "com.android.support:customtabs:27.1.1"
implementation "com.android.support:cardview-v7:27.1.1"
Also if you are using other firebase libraries check that everything is updated based on this link:
implementation 'com.crashlytics.sdk.android:crashlytics:2.9.4'
implementation 'com.google.firebase:firebase-core:16.0.1'
implementation 'com.google.firebase:firebase-ads:15.0.1'
implementation 'com.google.firebase:firebase-analytics:16.0.1'
implementation 'com.google.firebase:firebase-appindexing:16.0.1'
implementation 'com.google.firebase:firebase-auth:16.0.2'
implementation 'com.google.firebase:firebase-firestore:17.0.1'
implementation 'com.google.firebase:firebase-functions:16.0.1'
implementation 'com.google.firebase:firebase-messaging:17.0.0'
implementation 'com.google.firebase:firebase-storage:16.0.1'
implementation 'com.google.firebase:firebase-crash:16.0.1'
implementation 'com.google.firebase:firebase-invites:16.0.0'
implementation 'com.google.firebase:firebase-perf:16.0.0'
implementation 'com.google.firebase:firebase-database:16.0.1'
implementation 'com.google.firebase:firebase-config:16.0.0'
Upvotes: 1