@@ -16,11 +16,11 @@ login page.
16
16
Ideal for Laravel and Filament users seeking a straightforward OAuth integration.
17
17
18
18
> [ !WARNING]
19
- > Socialment is currently in beta. Please report any issues you encounter.
20
- >
19
+ > Socialment v4 is currently in beta. Please report any issues you encounter.
20
+ >
21
21
> Caution is advised if you choose to use this package in production.
22
- >
23
- > Azure AD support has been the only tested provider so far .
22
+ >
23
+ > Socialment v3 support is still available on the [ 3.x branch ] ( https://github.com/chrisreedio/socialment/tree/3.x ) .
24
24
25
25
#### References
26
26
@@ -59,18 +59,10 @@ You can easily perform the initial setup by running the following command:
59
59
php artisan socialment:install
60
60
```
61
61
62
- Additionally, edit your panel's ` tailwind.config.js ` content section to include the last line of the following:
62
+ Additionally, edit your panel's custom ` theme.css ` and add the following:
63
63
64
- ``` js
65
- content: [
66
- " ./app/Filament/**/*.php" ,
67
- " ./resources/views/filament/**/*.blade.php" ,
68
- " ./vendor/filament/**/*.blade.php" ,
69
- // ... Other Content Paths
70
-
71
- // Ensure the line below is listed!!!
72
- " ./vendor/chrisreedio/socialment/resources/**/*.blade.php" ,
73
- ],
64
+ ``` css
65
+ @source '../../../../vendor/chrisreedio/socialment/resources';
74
66
```
75
67
76
68
If this step is forgotten, the styling of the plugin will not be applied.
@@ -105,32 +97,6 @@ $panel
105
97
106
98
###### Provider Configuration
107
99
108
- > [ !WARNING]
109
- > This method of provider configuration is now deprecated and will be removed in a future release.
110
- >
111
- > Configuring providers in your [ panel configuration] ( #per-panel-provider-configuration ) has many advantages and is the recommended method.
112
-
113
- Whether you're using the default providers or adding your own, you'll need to configure them in the ` socialment.php `
114
- config file.
115
-
116
- Configure the ` socialment.php ` config file to specify providers in the following format:
117
-
118
- ``` php
119
- return [
120
- 'providers' => [
121
- 'azure' => [
122
- 'icon' => 'fab-microsoft', // Font Awesome Brand Icon
123
- 'label' => 'Azure', // Display Name on the Login Page
124
- ]
125
- ],
126
- // ... Other Configuration Parameters
127
- ];
128
- ```
129
-
130
- Providers specified in the config file are global across all panels.
131
-
132
- ##### Per-Panel Provider Configuration
133
-
134
100
You should specify providers on a per-panel basis. To do this use the ` ->registerProvider ` method on the plugin.
135
101
136
102
``` php
@@ -292,34 +258,31 @@ $panel->plugins([
292
258
This is the contents of the published config file:
293
259
294
260
``` php
261
+ // config for ChrisReedIO/Socialment
262
+
295
263
return [
296
264
'view' => [
297
265
// Set the text above the provider list
298
266
'prompt' => 'Or Login Via',
299
267
// Or change out the view completely with your own
300
268
'providers-list' => 'socialment::providers-list',
301
269
],
302
-
303
- // DEPRECATED: This will be removed in a future version.
304
- // Configure routes via the panel provider.
305
- 'routes' => [
306
- 'home' => 'filament.admin.pages.dashboard',
270
+
271
+ 'spa' => [
272
+ // The URL to redirect to after a successful login
273
+ 'home' => env('SPA_URL', 'http://localhost:3000'),
274
+ 'responses' => [
275
+ // Replace with your own JsonResource class if you want to customize the response
276
+ // 'me' => \ChrisReedIO\Socialment\Http\Resources\UserResponse::class,
277
+ ],
307
278
],
308
-
279
+
309
280
'models' => [
310
281
// If you want to use a custom user model, you can specify it here.
311
- 'user' => \App\Models\User::class,
312
- ],
313
-
314
- // DEPRECATED: This will be removed in a future version.
315
- // Configure providers via the panel provider.
316
- 'providers' => [
317
- 'azure' => [
318
- 'icon' => 'fab-microsoft',
319
- 'label' => 'Azure Active Directory',
320
- ]
282
+ 'user' => '\App\Models\User',
321
283
],
322
284
];
285
+
323
286
```
324
287
325
288
## Frontend SPA Authentication
0 commit comments