LP#1746020 Fix Safari/iOS login issue
authorKathy Lussier <klussier@masslnc.org>
Tue, 6 Feb 2018 17:41:19 +0000 (12:41 -0500)
committerGalen Charlton <gmc@equinoxinitiative.org>
Tue, 6 Feb 2018 20:08:53 +0000 (15:08 -0500)
Works around an issue where users cannot log into the web client using iOS
because Safari, which all browsers running on iOS use to some extent, does not
support BroadcastChannel.

Many thanks to Galen Charlton for providing a diff with this solution!

Signed-off-by: Kathy Lussier <klussier@masslnc.org>
Signed-off-by: Jason Boyer <jboyer@library.in.gov>
Signed-off-by: Galen Charlton <gmc@equinoxinitiative.org>
Open-ILS/web/js/ui/default/staff/services/auth.js

index ec83005..b93b6b8 100644 (file)
@@ -312,7 +312,7 @@ function($q , $timeout , $rootScope , $window , $location , egNet , egHatch) {
 
     service.logout = function(broadcast) {
 
-        if (broadcast) {
+        if (broadcast && service.authChannel.postMessage) {
             // Tell the other tabs to shut it all down.
             service.authChannel.postMessage({action : 'logout'});
         }