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

get url and add instance to a model with prefilled foreign key :django admin -

css - Make div keyboard-scrollable in jQuery Mobile? -

ruby on rails - Seeing duplicate requests handled with Unicorn -