aofdev / vue-firebase-auth-vuex

Vue FirebasešŸ”„ Authentication with Vuex
MIT License
262 stars 63 forks source link

Email Link Authentication #3

Open Arredatore opened 6 years ago

Arredatore commented 6 years ago

Hi,

I like your App a good point to start but as a new user to Vue, I'll make an offer to add the Email Link Authentication.

That isn't hard, where to put the callback though?

If in the main.js the guard will not allow access to the /profile so user will be back to the /signin then the answer from Firebase will come and the user will be redirected back to the /profile.

Setting the flag loading: false doesn't work either because the user almost certainly will be back to the new tab by the email link.

This is how it works in my app right now. Doesn't looks right.

As I said I'm new to Vue I'll be glad to see a right way to add this way of Authentication.

hkd987 commented 6 years ago

If you are wanting to do email link auth, the simplest way would be when a user creates an account you will redirect them to a page that tells them to check their email.

So instead of directing to /profile you would send the user to /check-email. This way when the user now has the auth link they will taken to profile.

Arredatore commented 6 years ago

So, yes probably this is the simplest way, have a dedicated page for this case. Thank you.

lonerockz commented 4 years ago

Firebase supports email verification using their service, you don't have to create it yourself:

https://firebase.googleblog.com/2017/02/email-verification-in-firebase-auth.html