Skip to content

Commit a1a3a7c

Browse files
committed
docs: update README for Socialment v4 and remove deprecated provider configuration
- Clarified that Socialment v4 is in beta and added a note about v3 support. - Updated instructions for Tailwind configuration to reference custom `theme.css`. - Removed deprecated provider configuration details and emphasized per-panel provider setup. - Added SPA configuration details for redirecting after login.
1 parent 5d42069 commit a1a3a7c

File tree

2 files changed

+20
-58
lines changed

2 files changed

+20
-58
lines changed

README.md

Lines changed: 20 additions & 57 deletions
Original file line numberDiff line numberDiff line change
@@ -16,11 +16,11 @@ login page.
1616
Ideal for Laravel and Filament users seeking a straightforward OAuth integration.
1717

1818
> [!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+
>
2121
> 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).
2424
2525
#### References
2626

@@ -59,18 +59,10 @@ You can easily perform the initial setup by running the following command:
5959
php artisan socialment:install
6060
```
6161

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:
6363

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';
7466
```
7567

7668
If this step is forgotten, the styling of the plugin will not be applied.
@@ -105,32 +97,6 @@ $panel
10597

10698
###### Provider Configuration
10799

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-
134100
You should specify providers on a per-panel basis. To do this use the `->registerProvider` method on the plugin.
135101

136102
```php
@@ -292,34 +258,31 @@ $panel->plugins([
292258
This is the contents of the published config file:
293259

294260
```php
261+
// config for ChrisReedIO/Socialment
262+
295263
return [
296264
'view' => [
297265
// Set the text above the provider list
298266
'prompt' => 'Or Login Via',
299267
// Or change out the view completely with your own
300268
'providers-list' => 'socialment::providers-list',
301269
],
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+
],
307278
],
308-
279+
309280
'models' => [
310281
// 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',
321283
],
322284
];
285+
323286
```
324287

325288
## Frontend SPA Authentication

config/socialment.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,5 +23,4 @@
2323
// If you want to use a custom user model, you can specify it here.
2424
'user' => '\App\Models\User',
2525
],
26-
2726
];

0 commit comments

Comments
 (0)