How to create Token-Based Authentication(oauth2) for AngularJS and Laravel Apps via passport

Posted 2 years ago by anonymox

I created a web app which it uses laravel default registration(auth), I've tested passport oauth2 client access token from taylor tutorial. My web app uses angular js for UI and laravel for backend , so I need to create user, when create user request is sent from angular and then create a global access token to give it in my response to angular which then in all later request I use it to authenticate requests.

actually I want to implement oauth2 authentication for my web app, but so far I've searched a lot but I couldn't find any useful step by step tutorial for it.

anyone can help me out?

FYI: I'm using laravel 5.3 with passport enabled and angular js 1.5 for frontend. Some might say use JWT, what if i want to sign in my user via their social networks ? like facebook or google plus ? does JWT handle that too?

Please sign in or create an account to participate in this conversation.

Reply to

Use Markdown with GitHub-flavored code blocks.