php - Laravel JWT and socialite plugin -


i using laravel's jwt plugin user login/authentication. works fine users table:enter image description here when registers website, entering password, email etc.

in jwt, checking email(which unique) , password.

i implement laravel's socialite plugin, enable login using google/facebook etc, using oauth2 .

could tell me how use both ?

i have set authentication middleware , checks authentication token(generated jwt plugin). not sure how work if login using g+ etc

if using jwtauth https://github.com/tymondesigns/jwt-auth , supports socialite login. after socialite returns authenticated user, can lookup db email or create if not exists. can generate token using $token = jwtauth::fromuser($user) .more discussions can found @ link https://laracasts.com/discuss/channels/laravel/how-would-one-use-jwt-json-web-tokens-with-laravel-socialite


Comments

Popular posts from this blog

c - How to retrieve a variable from the Apache configuration inside the module? -

c# - Constructor arguments cannot be passed for interface mocks -

python - malformed header from script index.py Bad header -