I’ve been using Firebase passwordless email link for authentication for the webapp, now with Capacitor, I’m trying to use the '@ionic-native/firebase-dynamic-links' . When clicking on the link it does open up the app but the sign in event is not triggered. Since I’m using Vue, I included this code on mount:
document.addEventListener('deviceready', () => {
FirebaseDynamicLinks.onDynamicLink().subscribe((res) => {
firebase.auth()
.signInWithEmailLink(email, res.deepLink)
.then(() => this.$router.push('/'))
.catch(function(error) {
console.log('err', error)
})
})
})
my actionCodeSettings option sent with firebase.auth().sendSignInLinkToEmail:
const actionCodeSettings = {
// URL you want to redirect back to. The domain (www.example.com) for this
// URL must be whitelisted in the Firebase Console.
url: 'https://myapp.com/login'
// This must be true.
handleCodeInApp: true,
android: {
packageName: 'com.myapp.mobile',
installApp: true
},
dynamicLinkDomain: 'myapp.page.link'
}
I do see the subscribe method when I debug on browser but not with AVD… Have anyone tried using these plugins with Vue or have any idea why the event is not fired? Thanks in advance!
1 post - 1 participant