Support the ongoing development of →
Authentication Requests Packages
Last updated 2 years ago.

Hi @jkirkby91 -- mind if I query your solution to this one, if you found one? I am in exactly the same train of thought and would be interested to know what you found out.

Thanks Phil


yea, me too. would be great to know if someone found a solution.


Maybe the authentication flow from Satellizer can help you - Satellizer is an Angular plugin for email and social authentication:

There is also a plugin for vue (vue-authenticate) which I suppose is doing basically the same:

I am currently working on integrating a Vue-SPA authentication with Laravel as backend with email und social authentication. That's why I am also interested in this topic. Have you in the meanwhile found a solution? thanks for your insights.


You need to look at the social authentication in a different way.

In the SPA use a package, like Hello.js or vue-authenticate to retrieve an access_token from one of your providers. Be sure that you're using the implicit auth flow.

Once you have retrieved an access token, you can send it to your API in exchange for an access_token to the API (Passport, JWT ect)

Your logic will be slightly different as you do not need to redirect the user from your API. Instead you could have a route like so:{provider}/token

Which implements the following:

$user = Socialite::driver($provider)->userFromToken($request->get('access_token'));

// Implement logic to create/retrieve existing user
// Implement logic to return a token (JWT, Passport)

Does that make sense?


Sign in to participate in this thread!


Your banner here too?

jkirkby91 jkirkby91 Joined 19 May 2017


We'd like to thank these amazing companies for supporting us

Your logo here?

The Laravel portal for problem solving, knowledge sharing and community building.

© 2024 - All rights reserved.