php - Laravel JWT and socialite plugin -
i using laravel's jwt plugin user login/authentication. works fine users table: 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
Post a Comment