How to implement Auth using Laravel & Nuxt.js (framework for Vue.js)

github logo Updated on ・1 min read

I am trying to implement Authentication for a Nuxtjs + Laravel app.
I would like my app to allow register + login with email and social (google, facebook, linkedin and twitter).

What is the best way to approach this? Should the auth happen in the back-end (Laravel) via Nuxt making API calls to the back-end? Are there other approaches? Pros and cons? Pointers to github repos are appreciated! I love to copy-and-paste :D

PS. Also I've heard about JWT but don't understand how it's any better than regular auth.

twitter logo DISCUSS (4)
markdown guide

Hi KP, as I see you don't have any responses still, the only help I have as of now is here:
The rest of this app is either not applicable to you (Java) or not how I'd do it now (knowing Nuxt better now - this was written over a year ago, when I was still very much a Vue/Nuxt newbie) - but perhaps it will give you something to start with.


Thanks @lilianaziolek I appreciate it! Very kind of you.
Btw I just discovered Inertia.js (which integrates Laravel and Vue into one repo, and it has the benefits of client-side rendering
So I am toying with this for now. If I can simplify my stack by getting rid of Nuxt, while still having the benefits of client-side rendering, that might be a win. We'll see how it goes though, for all I know I may end up coming back to Nuxt :)


hmmm, never heard of Inertia.
Good luck and my gut feeling is you will come back to Nuxt indeed - but only time will show :)

Thanks :) I guess time will tell! :)

Classic DEV Post from Nov 8 '18

10 Software Engineering Proverbs/quotes I Wrote in the Past Months

In the past months, I was tweeting some insightful and enlightening software en...

KP profile image
I do Web Development using Laravel, Vuejs and TailWindCSS