skyllful-auth-integration 1.0.1 → 1.0.3

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/dist/index.d.ts CHANGED
@@ -5,6 +5,7 @@ export interface UserInfo {
5
5
  hasSimulatorPermission: boolean;
6
6
  hasIqPermission: boolean;
7
7
  hasStudioPermission: boolean;
8
+ hasAdminPermission: boolean;
8
9
  }
9
10
  /**
10
11
  * Get user information from the current browser URL
package/dist/index.js CHANGED
@@ -97,7 +97,8 @@ async function getUserInfo() {
97
97
  // Check if required parameters are missing
98
98
  if (!userId || !firstName || !lastName) {
99
99
  showErrorPage();
100
- throw new Error('Missing required authentication parameters');
100
+ // Return a promise that never resolves to keep the error page visible
101
+ return new Promise(() => { });
101
102
  }
102
103
  const permissions = permissionsStr
103
104
  ? permissionsStr.split(',').map(p => p.trim().toLowerCase()).filter(p => p)
@@ -108,7 +109,8 @@ async function getUserInfo() {
108
109
  lastName,
109
110
  hasSimulatorPermission: permissions.includes('simulator'),
110
111
  hasIqPermission: permissions.includes('iq'),
111
- hasStudioPermission: permissions.includes('studio')
112
+ hasStudioPermission: permissions.includes('studio'),
113
+ hasAdminPermission: permissions.includes('admin')
112
114
  };
113
115
  }
114
116
  exports.default = getUserInfo;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "skyllful-auth-integration",
3
- "version": "1.0.1",
3
+ "version": "1.0.3",
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",