Skip to content

Commit 2c69914

Browse files
committed
update import
1 parent c8a3f85 commit 2c69914

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

socialite.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ These credentials should be placed in your application's `config/services.php` c
6161
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:
6262

6363
```php
64-
use Laravel\Socialite\Facades\Socialite;
64+
use Laravel\Socialite\Socialite;
6565

6666
Route::get('/auth/redirect', function () {
6767
return Socialite::driver('github')->redirect();
@@ -84,7 +84,7 @@ Once the user has been retrieved from the OAuth provider, you may determine if t
8484
```php
8585
use App\Models\User;
8686
use Illuminate\Support\Facades\Auth;
87-
use Laravel\Socialite\Facades\Socialite;
87+
use Laravel\Socialite\Socialite;
8888

8989
Route::get('/auth/callback', function () {
9090
$githubUser = Socialite::driver('github')->user();
@@ -113,7 +113,7 @@ Route::get('/auth/callback', function () {
113113
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:
114114

115115
```php
116-
use Laravel\Socialite\Facades\Socialite;
116+
use Laravel\Socialite\Socialite;
117117

118118
return Socialite::driver('github')
119119
->scopes(['read:user', 'public_repo'])
@@ -165,7 +165,7 @@ When generating a bot token, the `user` method will still return a `Laravel\Soci
165165
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:
166166

167167
```php
168-
use Laravel\Socialite\Facades\Socialite;
168+
use Laravel\Socialite\Socialite;
169169

170170
return Socialite::driver('google')
171171
->with(['hd' => 'example.com'])
@@ -183,7 +183,7 @@ After the user is redirected back to your application's authentication callback
183183
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:
184184

185185
```php
186-
use Laravel\Socialite\Facades\Socialite;
186+
use Laravel\Socialite\Socialite;
187187

188188
Route::get('/auth/callback', function () {
189189
$user = Socialite::driver('github')->user();
@@ -212,7 +212,7 @@ Route::get('/auth/callback', function () {
212212
If you already have a valid access token for a user, you can retrieve their user details using Socialite's `userFromToken` method:
213213

214214
```php
215-
use Laravel\Socialite\Facades\Socialite;
215+
use Laravel\Socialite\Socialite;
216216

217217
$user = Socialite::driver('github')->userFromToken($token);
218218
```
@@ -225,7 +225,7 @@ If you are using Facebook Limited Login via an iOS application, Facebook will re
225225
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:
226226

227227
```php
228-
use Laravel\Socialite\Facades\Socialite;
228+
use Laravel\Socialite\Socialite;
229229

230230
return Socialite::driver('google')->stateless()->user();
231231
```

0 commit comments

Comments
 (0)