@openstax/ts-utils 1.12.1 → 1.12.2
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.
|
@@ -104,8 +104,10 @@ export const browserAuthProvider = ({ window, configSpace }) => (configProvider)
|
|
|
104
104
|
return userDataFromParentWindow;
|
|
105
105
|
}
|
|
106
106
|
const userDataFromAuthQuery = await getFetchUser();
|
|
107
|
-
|
|
108
|
-
|
|
107
|
+
// userDataFromParentWindow has an extra field (role)
|
|
108
|
+
if (userDataFromAuthQuery.token === userDataFromParentWindow.token &&
|
|
109
|
+
isEqual(userDataFromAuthQuery.user, userDataFromParentWindow.user)) {
|
|
110
|
+
return userDataFromParentWindow;
|
|
109
111
|
}
|
|
110
112
|
throw new UnauthorizedError();
|
|
111
113
|
});
|