php - How to check the validity of token by Oauth provider using Socialite in Laravel 5? -


i able use socialite in project per tutorial : http://www.codeanchor.net/blog/complete-laravel-socialite-tutorial/

everything worked fine have security concern in it.

if (!$request) {     return $this->getauthorizationfirst($provider); } 

this checks token. correct way check token?

when @ tutorial noticed $this->getauthorizationfirst($provider) calls getauthorizationfirst method declared inside custom authenticateuser class.

the getauthorizationfirst method forces socialite driver redirect user provide (facebook, github, twitter, etc.) in order authenticate user against provider. process returns authenticated user calling application.

// authenticate connecting provider api private function getauthorizationfirst($provider) {      return $this->socialite->driver($provider)->redirect(); }  // provider returns authenticated user post-authentication processing private function getsocialuser($provider) {     return $this->socialite->driver($provider)->user(); } 

this ties in processes exposed socialite redirect , return specified url post-authentication user processing.

from security perspective relies on application calling provider's api , getting authenticated user back.

socialite exposing redirect , return method authentication. unable oauth authenticate without redirecting provider api first.

this tutorial looks heavily based on tutorial put jeffrey way on @ laracasts.com can found here:

https://laracasts.com/series/whats-new-in-laravel-5/episodes/9


Comments

Popular posts from this blog

Magento/PHP - Get phones on all members in a customer group -

php - .htaccess mod_rewrite for dynamic url which has domain names -

Website Login Issue developed in magento -