| 1 | <?php  | 
            ||
| 9 | class SocialiteController  | 
            ||
| 10 | { | 
            ||
| 11 | /**  | 
            ||
| 12 | * Redirect the user to the OAuth Provider.  | 
            ||
| 13 | */  | 
            ||
| 14 | public function redirectToProvider()  | 
            ||
| 18 | |||
| 19 | /**  | 
            ||
| 20 | * Obtain the user information from provider. Check if the user already exists in our  | 
            ||
| 21 | * database by looking up their provider_id in the database.  | 
            ||
| 22 | * If the user exists, log them in. Otherwise, create a new user then log them in. After that  | 
            ||
| 23 | * redirect them to the authenticated users homepage.  | 
            ||
| 24 | */  | 
            ||
| 25 | public function handleProviderCallback()  | 
            ||
| 35 | }  | 
            ||
| 36 |