1/** 2 * @file 3 * Handle automatic login related functionality. 4 * 5 */ 6 7(function ($, Drupal) { 8 Drupal.behaviors.login = { 9 attach: function (context) { 10 ('use strict'); 11 12 const url = new URL(window.location.href); 13 // If the url contains login query parameter and the user isn't 14 // logged in, redirect the user to azure login. 15 if (url.searchParams.get('login') && drupalSettings.user.uid === 0) { 16 // Prevents redirect. 17 document.cookie = 'logged_in=true; path=/;'; 18 const lang = drupalSettings.path.pathPrefix; 19 const loginPage = new URL( 20 `${window.location.origin}/${lang}mo-oauth-client/user/login/azure-b2c`, 21 ); 22 window.location.replace(loginPage); 23 } 24 }, 25 }; 26})(jQuery, Drupal);
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.