@@ -47,7 +47,7 @@ $config = [
4747 'github' => [
4848 'client_id' => 'your-app-id',
4949 'client_secret' => 'your-app-secret',
50- 'redirect' => 'http://localhost/socialite/callback.php',
50+ 'redirect_uri' => 'http://localhost/socialite/callback.php',
5151 ],
5252];
5353
@@ -69,7 +69,7 @@ $config = [
6969 'github' => [
7070 'client_id' => 'your-app-id',
7171 'client_secret' => 'your-app-secret',
72- 'redirect ' => 'http://localhost/socialite/callback.php',
72+ 'redirect_uri ' => 'http://localhost/socialite/callback.php',
7373 ],
7474];
7575
@@ -89,20 +89,21 @@ $user->getEmail(); // "anzhengchao@gmail.com"
8989
9090## Configuration
9191
92- Each create uses the same configuration keys: ` client_id ` , ` client_secret ` , ` redirect ` .
92+ Each provider uses the same configuration keys: ` client_id ` , ` client_secret ` , ` redirect_uri ` .
93+ Legacy aliases are still supported: ` redirect ` , ` redirect_url ` .
9394
9495Example:
9596``` php
9697$config = [
9798 'weibo' => [
9899 'client_id' => 'your-app-id',
99100 'client_secret' => 'your-app-secret',
100- 'redirect' => 'http://localhost/socialite/callback.php',
101+ 'redirect_uri' => 'http://localhost/socialite/callback.php',
101102 ],
102103 'facebook' => [
103104 'client_id' => 'your-app-id',
104105 'client_secret' => 'your-app-secret',
105- 'redirect' => 'http://localhost/socialite/callback.php',
106+ 'redirect_uri' => 'http://localhost/socialite/callback.php',
106107 ],
107108];
108109```
@@ -117,15 +118,15 @@ $config = [
117118 'provider' => 'github', // <-- provider name
118119 ' client_id' => 'your-app-id',
119120 'client_secret' => 'your-app-secret',
120- 'redirect ' => 'http://localhost/socialite/callback.php',
121+ 'redirect_uri ' => 'http://localhost/socialite/callback.php',
121122 ],
122123
123124 // another github app
124125 'bar' => [
125126 'provider' => 'github', // <-- provider name
126127 ' client_id' => 'your-app-id',
127128 'client_secret' => 'your-app-secret',
128- 'redirect ' => 'http://localhost/socialite/callback.php',
129+ 'redirect_uri ' => 'http://localhost/socialite/callback.php',
129130 ],
130131 //...
131132];
@@ -144,7 +145,7 @@ $config = [
144145 'provider' => 'myprovider', // <-- provider name
145146 ' client_id' => 'your-app-id',
146147 'client_secret' => 'your-app-secret',
147- 'redirect ' => 'http://localhost/socialite/callback.php',
148+ 'redirect_uri ' => 'http://localhost/socialite/callback.php',
148149 ],
149150];
150151
@@ -176,7 +177,7 @@ $config = [
176177 'provider' => MyCustomProvider::class, // <-- class name
177178 ' client_id' => 'your-app-id',
178179 'client_secret' => 'your-app-secret',
179- 'redirect ' => 'http://localhost/socialite/callback.php',
180+ 'redirect_uri ' => 'http://localhost/socialite/callback.php',
180181 ],
181182];
182183
@@ -206,8 +207,8 @@ $config = [
206207 'rsa_private_key' => 'your-rsa-private-key',
207208
208209 // Be sure to set this value and make sure that it is the same address value as set in the official admin system.
209- // This can also be named as 'redirect_url' like the official documentation.
210- 'redirect ' => 'http://localhost/socialite/callback.php',
210+ // Recommended key: 'redirect_uri' (legacy aliases: 'redirect', 'redirect_url')
211+ 'redirect_uri ' => 'http://localhost/socialite/callback.php',
211212 ]
212213 ...
213214];
@@ -240,8 +241,8 @@ $config = [
240241 // or 'app_secret'
241242 'client_secret' => 'your app secret',
242243
243- // or 'redirect_url'
244- 'redirect ' => 'redirect URL'
244+ // legacy aliases: 'redirect' or 'redirect_url'
245+ 'redirect_uri ' => 'redirect URL'
245246 ]
246247];
247248
@@ -268,7 +269,7 @@ $config = [
268269
269270 'client_secret' => 'your app secret',
270271
271- 'redirect ' => 'redirect URL'
272+ 'redirect_uri ' => 'redirect URL'
272273 ]
273274];
274275
@@ -288,7 +289,7 @@ $config = [
288289 'toutiao' => [
289290 'client_id' => 'your app id',
290291 'client_secret' => 'your app secret',
291- 'redirect ' => 'redirect URL'
292+ 'redirect_uri ' => 'redirect URL'
292293 ]
293294];
294295
@@ -307,7 +308,7 @@ $config = [
307308 'xigua' => [
308309 'client_id' => 'your app id',
309310 'client_secret' => 'your app secret',
310- 'redirect ' => 'redirect URL'
311+ 'redirect_uri ' => 'redirect URL'
311312 ]
312313];
313314
@@ -348,8 +349,8 @@ $config = [
348349 // or 'app_secret'
349350 'client_secret' => 'your app secret',
350351
351- // or 'redirect_url'
352- 'redirect ' => 'redirect URL',
352+ // legacy aliases: 'redirect' or 'redirect_url'
353+ 'redirect_uri ' => 'redirect URL',
353354
354355 // if you want to use internal way to get app_access_token
355356 // set this key by 'internal' then you already turn on the internal app mode
@@ -378,8 +379,8 @@ $config = [
378379 // or 'app_secret'
379380 'client_secret' => 'your app secret',
380381
381- // or 'redirect_url'
382- 'redirect ' => 'redirect URL',
382+ // legacy aliases: 'redirect' or 'redirect_url'
383+ 'redirect_uri ' => 'redirect URL',
383384
384385 // if you want to use internal way to get app_access_token
385386 // set this key by 'internal' then you already turn on the internal app mode
@@ -416,7 +417,7 @@ You just need input your config like below config. Official Accounts authorizati
416417 [
417418 'client_id' => 'client_id',
418419 'client_secret' => 'client_secret',
419- 'redirect ' => 'redirect-url',
420+ 'redirect_uri ' => 'redirect-url',
420421
421422 // Open Platform - Third-party Platform Need
422423 'component' => [
@@ -438,7 +439,7 @@ $config = [
438439 'team_url' => 'https://{your-team}.coding.net',
439440 'client_id' => 'your app id',
440441 'client_secret' => 'your app secret',
441- 'redirect ' => 'redirect URL',
442+ 'redirect_uri ' => 'redirect URL',
442443 ]
443444];
444445```
@@ -456,7 +457,7 @@ $config = [
456457 'client_id' => 'AT******************',
457458 'client_secret' => 'EK**************',
458459 'sandbox' => false,
459- 'redirect_url'=> "nativexo://paypalpay",
460+ 'redirect_uri' => "nativexo://paypalpay",
460461 ],
461462];
462463```
@@ -474,7 +475,7 @@ $config = [
474475 'team_id' => 'XXXXXXXXXX', // Apple Developer Team ID
475476 'key_id' => 'XXXXXXXXXX', // Key ID from Apple Developer
476477 'private_key' => file_get_contents('/path/to/AuthKey_XXXXXXXXXX.p8'), // .p8 private key content
477- 'redirect' => 'https://example.com/auth/apple/callback',
478+ 'redirect_uri' => 'https://example.com/auth/apple/callback',
478479 ],
479480];
480481```
@@ -494,7 +495,7 @@ $response = $socialite->create('github')
494495
495496### Redirect URL
496497
497- You may also want to dynamically set ` redirect_uri ` , you can use the following methods to change the ` redirect_uri ` URL:
498+ You may also want to dynamically set ` redirect_uri ` , you can use the following methods to change the ` redirect_uri ` URL:
498499
499500``` php
500501$url = 'your callback url.';
0 commit comments