You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This is the way to access permission: https://developer.mozilla.org/en-US/docs/Web/API/Document/requestStorageAccess. However, it's not as simple as it looks. Permission must be requested only with a user interaction (ie. when they press the button), and it does not work to open the meeting automatically after permission has been granted.
The reason that Moodle does not have this problem seems to be because they implemented the following: In addition, sandboxed <iframe>s cannot be granted storage access by default for security reasons. The API therefore also adds the allow-storage-access-by-user-activation sandbox token. The embedding website needs to add this to allow storage access requests to be successful, along with allow-scripts and allow-same-origin to allow it to call the API, and execute in an origin that can have cookies: (from https://developer.mozilla.org/en-US/docs/Web/API/Storage_Access_API)
The text was updated successfully, but these errors were encountered:
This is what I have so far, but it requires the user to accept the cookies, and then refresh the browser before clicking on 'join meeting' again. I have tried triggering these actions from the js but that will still return a 401.
/*
With Dynamic State Partitioning enabled, Firefox provides embedded resources with a separate storage bucket for every top-level website, causing the request to be denied if it comes from a third party. Embedded third-parties may request access to the top-level storage bucket, which is what we're doing with the requestAccess() method.
*/
function requestAccess(){
document.requestStorageAccess().then(
() => {
console.log('access granted!');
// the user needs to reload and then press the button again for it to work
},
() => { console.log('access denied') }
);
}
document.hasStorageAccess().then((hasAccess) => {
if (!hasAccess && (isFirefox || isSafari)) {
console.log("no access");
// storage access has not been granted
$('#meeting_join_form').one('submit', function(e) {
e.preventDefault();
requestAccess();
});
} else {
console.log("Already has access");
}
});
Joining a meeting from D2L or EdX on Firefox results in a 401 unauthorized error (and I suspect this problem will also be on Safari, although we have not tested it). This is due to the State Partitioning feature of Firefox (https://developer.mozilla.org/en-US/docs/Web/Privacy/Storage_Access_Policy/Errors/CookiePartitionedForeign).
This is the way to access permission: https://developer.mozilla.org/en-US/docs/Web/API/Document/requestStorageAccess. However, it's not as simple as it looks. Permission must be requested only with a user interaction (ie. when they press the button), and it does not work to open the meeting automatically after permission has been granted.
The reason that Moodle does not have this problem seems to be because they implemented the following:
In addition, sandboxed <iframe>s cannot be granted storage access by default for security reasons. The API therefore also adds the allow-storage-access-by-user-activation sandbox token. The embedding website needs to add this to allow storage access requests to be successful, along with allow-scripts and allow-same-origin to allow it to call the API, and execute in an origin that can have cookies:
(from https://developer.mozilla.org/en-US/docs/Web/API/Storage_Access_API)The text was updated successfully, but these errors were encountered: