You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: socialite.md
+7-7Lines changed: 7 additions & 7 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -61,7 +61,7 @@ These credentials should be placed in your application's `config/services.php` c
61
61
To authenticate users using an OAuth provider, you will need two routes: one for redirecting the user to the OAuth provider, and another for receiving the callback from the provider after authentication. The example routes below demonstrate the implementation of both routes:
62
62
63
63
```php
64
-
use Laravel\Socialite\Facades\Socialite;
64
+
use Laravel\Socialite\Socialite;
65
65
66
66
Route::get('/auth/redirect', function () {
67
67
return Socialite::driver('github')->redirect();
@@ -84,7 +84,7 @@ Once the user has been retrieved from the OAuth provider, you may determine if t
@@ -113,7 +113,7 @@ Route::get('/auth/callback', function () {
113
113
Before redirecting the user, you may use the `scopes` method to specify the "scopes" that should be included in the authentication request. This method will merge all previously specified scopes with the scopes that you specify:
114
114
115
115
```php
116
-
use Laravel\Socialite\Facades\Socialite;
116
+
use Laravel\Socialite\Socialite;
117
117
118
118
return Socialite::driver('github')
119
119
->scopes(['read:user', 'public_repo'])
@@ -165,7 +165,7 @@ When generating a bot token, the `user` method will still return a `Laravel\Soci
165
165
A number of OAuth providers support other optional parameters on the redirect request. To include any optional parameters in the request, call the `with` method with an associative array:
166
166
167
167
```php
168
-
use Laravel\Socialite\Facades\Socialite;
168
+
use Laravel\Socialite\Socialite;
169
169
170
170
return Socialite::driver('google')
171
171
->with(['hd' => 'example.com'])
@@ -183,7 +183,7 @@ After the user is redirected back to your application's authentication callback
183
183
Differing properties and methods may be available on this object depending on whether the OAuth provider you are authenticating with supports OAuth 1.0 or OAuth 2.0:
184
184
185
185
```php
186
-
use Laravel\Socialite\Facades\Socialite;
186
+
use Laravel\Socialite\Socialite;
187
187
188
188
Route::get('/auth/callback', function () {
189
189
$user = Socialite::driver('github')->user();
@@ -212,7 +212,7 @@ Route::get('/auth/callback', function () {
212
212
If you already have a valid access token for a user, you can retrieve their user details using Socialite's `userFromToken` method:
@@ -225,7 +225,7 @@ If you are using Facebook Limited Login via an iOS application, Facebook will re
225
225
The `stateless` method may be used to disable session state verification. This is useful when adding social authentication to a stateless API that does not utilize cookie based sessions:
0 commit comments