So time to work on authentication
and for this first of all, we can go to the app.js file and set the default auth mode to false.
Now if everything reloads, we start on the login page and I want to start there
so that we can switch to sign up and create users and then log in with these users. Now stitch offers us
a simple way of adding real user authentication
and for that, we just have to go back to users and under providers,
we can now disable anonymous login and save that and instead turn on email password login,
so we enable this. Now email password login ships with confirmation and password resetting built-in,
now I'll not show the password reset part,
you can learn all about that in the official docs,
it's really easy
but we need to enable e-mail confirmation so that anything works.
So for this, users should receive an email where they are forwarded to
localhost 3000 confirm account and you need to get that right.
Your react app will run on this host if you deploy it onto a real server,
you should of course update this
and this is a page which I prepared, a route which I prepared which we then can work on to confirm the
account with stitch.
Now this last field here is optional,
you could enter the subject for the confirmation email as is this field.
This field is required and I will enter something there but this will not work.
Right, so this is not a route I added,
you could as a challenge do this on your own,
I don't need resetting in my app, I want to have or I need to have confirmation though.
So now let's save this
and now we enabled this user email authentication.
How do we now use that in our app?