Epic Next JS 14 Tutorial Part 4: How To Handle Login And Authentication in Next.js

In the previous tutorial, we finished our Home Page, so we will build out our Sign In and Sign Up Pages and hook up the logic to allow us to sign in and sign up.


This is a companion discussion topic for the original entry at https://strapi.io/blog/epic-next-js-14-tutorial-part-4-how-to-handle-login-and-authentication-in-next-js

Hi Paul,
Many thanks for this great tutorial, it helps a lot understanding strapi and NextJS.
Could you please extend this tutorial with google signIn / signOut and probably with the register - email confirmation and forgotten password flows?
Thanks in advance,
Csaba

Thank you for you comment. For this tutorial I am going to keep it in its current scope. Since there is still a lot of content to cover.

But I will add these topics to our pool of topics and create them as stand alone videos in order to cover the use of available providers, as well as, the password reset flow.

I have came here also for “forget password” feature.
It is a must in my project and I was hoping I could use Strapi for it.
I see there is a module Users&Permissions with forget password, allowing or not users sign up, welcome and forget email templates… Very nice features but other than in this blog article I couldn’t find anywhere how could I actually use them. I have checked starters and examples and none of them seem to use normal sign in form with forget password feature…

Thank you so much for this great tutorial . The explanations are very clear and it help so much to understand. As the previous people said , it will be great to extend your tutorial with google signIn / signOut and forgotten password flows. Saving also the session state in zustand store to be able to modify components if the user is connected or not. Once again thank you so much for the great help :slight_smile:

Hi @Paul_Brats,
Thanks for this tutorial it’s helpful. Do you know how to check is authenticated in client side with cookies? Let’s say in navbar I have a menu if have authenticated will shows the name and avatar of this user if not will shows the link sign-in. Looking forward to your response. Thank you!