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 +6 -3
- package/dist/index.js +1 -1
- package/package.json +1 -1
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