@reactoo/watchtogether-sdk-js 2.8.47 → 2.8.48
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/package.json
CHANGED
package/src/modules/wt-auth.js
CHANGED
|
@@ -115,7 +115,8 @@ class Auth {
|
|
|
115
115
|
isLoggedInAsInstanceAdmin: this.isLoggedInAs(this.__parsedJwt, 'instanceAdmin'),
|
|
116
116
|
isDemoAccount: this.isLoggedInAs(this.__parsedJwt, 'demo'),
|
|
117
117
|
isLoggedInAsAdmin: this.isLoggedInAs(this.__parsedJwt, 'admin'),
|
|
118
|
-
domain: this.getDomain(this.__parsedJwt)
|
|
118
|
+
domain: this.getDomain(this.__parsedJwt),
|
|
119
|
+
parentUserId: this.getParentUserId(this.__parsedJwt)
|
|
119
120
|
});
|
|
120
121
|
return client;
|
|
121
122
|
})
|
|
@@ -167,6 +168,11 @@ class Auth {
|
|
|
167
168
|
parsedJwt = parsedJwt || this.__parsedJwt;
|
|
168
169
|
return parsedJwt['custom:domain'];
|
|
169
170
|
}
|
|
171
|
+
|
|
172
|
+
getParentUserId(parsedJwt) {
|
|
173
|
+
parsedJwt = parsedJwt || this.__parsedJwt;
|
|
174
|
+
return parsedJwt ? parsedJwt['custom:parentUserId'] : null;
|
|
175
|
+
}
|
|
170
176
|
|
|
171
177
|
parseJwt(jwt) {
|
|
172
178
|
if (!jwt || typeof jwt !== "string") return false;
|