skyllful-auth-integration 1.0.3 → 1.0.5

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
@@ -14,7 +14,7 @@ npm install skyllful-auth-integration
14
14
  import { getUserInfo } from 'skyllful-auth-integration';
15
15
 
16
16
  // In browser environment
17
- // Current URL: https://app.example.com/?userId=456&firstName=Jane&lastName=Smith&permissions=simulator,iq
17
+ // Current URL: https://app.example.com/?userId=456&firstName=Jane&lastName=Smith&permissions=simulator,iq,admin
18
18
  const userInfo = await getUserInfo();
19
19
 
20
20
  console.log(userInfo);
@@ -24,7 +24,8 @@ console.log(userInfo);
24
24
  // lastName: 'Smith',
25
25
  // hasSimulatorPermission: true,
26
26
  // hasIqPermission: true,
27
- // hasStudioPermission: false
27
+ // hasStudioPermission: false,
28
+ // hasAdminPermission: true
28
29
  // }
29
30
  ```
30
31
 
@@ -49,6 +50,7 @@ Get user information from the current browser URL.
49
50
  - `hasSimulatorPermission` (boolean): True if `permissions` includes "simulator"
50
51
  - `hasIqPermission` (boolean): True if `permissions` includes "iq"
51
52
  - `hasStudioPermission` (boolean): True if `permissions` includes "studio"
53
+ - `hasAdminPermission` (boolean): True if `permissions` includes "admin"
52
54
 
53
55
  **Note:** This function only works in browser environments and will throw an error in Node.js.
54
56
 
@@ -56,7 +58,7 @@ Get user information from the current browser URL.
56
58
  - `userId` - The user ID
57
59
  - `firstName` - The user's first name
58
60
  - `lastName` - The user's last name
59
- - `permissions` - Comma-separated list of permissions (e.g., `simulator,iq,studio`)
61
+ - `permissions` - Comma-separated list of permissions (e.g., `simulator,iq,studio,admin`)
60
62
 
61
63
  ## TypeScript
62
64
 
@@ -70,6 +72,7 @@ interface UserInfo {
70
72
  hasSimulatorPermission: boolean;
71
73
  hasIqPermission: boolean;
72
74
  hasStudioPermission: boolean;
75
+ hasAdminPermission: boolean;
73
76
  }
74
77
  ```
75
78
 
package/dist/index.js CHANGED
@@ -12,7 +12,7 @@ function showErrorPage() {
12
12
  left: 0;
13
13
  width: 100%;
14
14
  height: 100%;
15
- background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
15
+ background: #F4F4F4;
16
16
  display: flex;
17
17
  align-items: center;
18
18
  justify-content: center;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "skyllful-auth-integration",
3
- "version": "1.0.3",
3
+ "version": "1.0.5",
4
4
  "description": "Parse authentication parameters from URL and extract user information",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",