@progalaxyelabs/ngx-stonescriptphp-client 1.3.0 → 1.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md
CHANGED
|
@@ -7,9 +7,9 @@
|
|
|
7
7
|
|
|
8
8
|
**Note:** While published as `@progalaxyelabs/ngx-stonescriptphp-client`, this is the official client for [StoneScriptPHP](https://stonescriptphp.org). Future versions will migrate to the `@stonescriptphp` namespace.
|
|
9
9
|
|
|
10
|
-
## ✅ Authentication Support (v2.0.0)
|
|
10
|
+
## ✅ Authentication Support (v2.0.0+)
|
|
11
11
|
|
|
12
|
-
**Current Version:
|
|
12
|
+
**Current Version: 1.4.0 (Full-Page Authentication Components)**
|
|
13
13
|
|
|
14
14
|
**Fully compatible with StoneScriptPHP Framework v2.1.x authentication!**
|
|
15
15
|
|
|
@@ -19,7 +19,22 @@
|
|
|
19
19
|
- ✅ **Configurable**: Choose your auth strategy via environment config
|
|
20
20
|
- ✅ **All HTTP methods**: GET, POST, PUT, PATCH, DELETE with automatic token refresh
|
|
21
21
|
|
|
22
|
-
###
|
|
22
|
+
### Full-Page Authentication UI (NEW in v1.4.0)
|
|
23
|
+
- ✅ **AuthPageComponent**: Embeddable full-page auth with custom branding
|
|
24
|
+
- ✅ **Customizable Branding**: Logo, colors, gradients, app name, subtitle
|
|
25
|
+
- ✅ **Login/Register Toggle**: Seamless switching between modes
|
|
26
|
+
- ✅ **Styled Card Layout**: Professional gradient background with centered card
|
|
27
|
+
- ✅ **Zero Configuration**: Works out-of-the-box with sensible defaults
|
|
28
|
+
|
|
29
|
+
```typescript
|
|
30
|
+
// Quick Example: Branded auth page
|
|
31
|
+
<lib-auth-page
|
|
32
|
+
[providers]="['google', 'emailPassword']"
|
|
33
|
+
(authenticated)="onAuth($event)">
|
|
34
|
+
</lib-auth-page>
|
|
35
|
+
```
|
|
36
|
+
|
|
37
|
+
### Modal-Based User Authentication (v2.0.0)
|
|
23
38
|
- ✅ **6 Auth Providers**: Google, LinkedIn, Apple, Microsoft, GitHub, Email/Password
|
|
24
39
|
- ✅ **Declarative Configuration**: Enable/disable providers via environment
|
|
25
40
|
- ✅ **Popup OAuth**: Social login via popup windows (no full-page redirects)
|
|
@@ -139,6 +154,76 @@ PHP Backend (StoneScriptPHP) Angular Frontend
|
|
|
139
154
|
|
|
140
155
|
## Configuration
|
|
141
156
|
|
|
157
|
+
### Branding Configuration (v1.4.0+)
|
|
158
|
+
|
|
159
|
+
Customize your authentication pages with your brand identity:
|
|
160
|
+
|
|
161
|
+
```typescript
|
|
162
|
+
// app.config.ts or environment.ts
|
|
163
|
+
import { NgxStoneScriptPhpClientModule, MyEnvironmentModel } from '@progalaxyelabs/ngx-stonescriptphp-client';
|
|
164
|
+
|
|
165
|
+
export const appConfig: ApplicationConfig = {
|
|
166
|
+
providers: [
|
|
167
|
+
NgxStoneScriptPhpClientModule.forRoot({
|
|
168
|
+
apiServer: {
|
|
169
|
+
host: 'http://localhost:9100/'
|
|
170
|
+
},
|
|
171
|
+
branding: {
|
|
172
|
+
appName: 'My Platform', // Required: App name on auth pages
|
|
173
|
+
logo: '/assets/logo.png', // Optional: Logo URL
|
|
174
|
+
primaryColor: '#667eea', // Optional: Auto-generates gradient
|
|
175
|
+
gradientStart: '#667eea', // Optional: Custom gradient start
|
|
176
|
+
gradientEnd: '#764ba2', // Optional: Custom gradient end
|
|
177
|
+
subtitle: 'Secure authentication' // Optional: Subtitle text
|
|
178
|
+
}
|
|
179
|
+
} as MyEnvironmentModel)
|
|
180
|
+
]
|
|
181
|
+
};
|
|
182
|
+
```
|
|
183
|
+
|
|
184
|
+
**Using the AuthPageComponent:**
|
|
185
|
+
|
|
186
|
+
```typescript
|
|
187
|
+
import { Component } from '@angular/core';
|
|
188
|
+
import { AuthPageComponent, TenantSelectedEvent } from '@progalaxyelabs/ngx-stonescriptphp-client';
|
|
189
|
+
|
|
190
|
+
@Component({
|
|
191
|
+
selector: 'app-login',
|
|
192
|
+
standalone: true,
|
|
193
|
+
imports: [AuthPageComponent],
|
|
194
|
+
template: `
|
|
195
|
+
<lib-auth-page
|
|
196
|
+
[providers]="['google', 'linkedin', 'emailPassword']"
|
|
197
|
+
(authenticated)="onAuthenticated($event)">
|
|
198
|
+
</lib-auth-page>
|
|
199
|
+
`
|
|
200
|
+
})
|
|
201
|
+
export class LoginComponent {
|
|
202
|
+
onAuthenticated(event: TenantSelectedEvent) {
|
|
203
|
+
console.log('User authenticated:', event);
|
|
204
|
+
// Navigate to dashboard, etc.
|
|
205
|
+
}
|
|
206
|
+
}
|
|
207
|
+
```
|
|
208
|
+
|
|
209
|
+
**Branding Options:**
|
|
210
|
+
|
|
211
|
+
| Option | Type | Description |
|
|
212
|
+
|--------|------|-------------|
|
|
213
|
+
| `appName` | `string` | **Required**. Application name displayed on auth pages |
|
|
214
|
+
| `logo` | `string` | Optional. URL to logo image (max 200x80px recommended) |
|
|
215
|
+
| `primaryColor` | `string` | Optional. Primary brand color (hex). Auto-generates gradient if no gradient colors provided |
|
|
216
|
+
| `gradientStart` | `string` | Optional. Gradient start color (hex). Overrides primaryColor |
|
|
217
|
+
| `gradientEnd` | `string` | Optional. Gradient end color (hex). Required if gradientStart is set |
|
|
218
|
+
| `subtitle` | `string` | Optional. Subtitle text below app name |
|
|
219
|
+
|
|
220
|
+
**Default Styling:**
|
|
221
|
+
- Gradient: `linear-gradient(135deg, #667eea 0%, #764ba2 100%)`
|
|
222
|
+
- White card with rounded corners and shadow
|
|
223
|
+
- Responsive design (mobile-friendly)
|
|
224
|
+
|
|
225
|
+
---
|
|
226
|
+
|
|
142
227
|
### Authentication Modes (v1.0.0+)
|
|
143
228
|
|
|
144
229
|
Choose your authentication strategy based on your backend:
|