Skip to content

Prompt user to reload page when SAML SSO session has expired

Eduardo Sanz García requested to merge eduardosanz/saml-modal into master

What does this MR do and why?

This change adds a modal in the group and project pages that prompts the user to reload the page if the SAML session has expired.

This is part #1. In part #2, we will dismiss the modal if the user has been re-authenticated in another window/tab.

EE: true

Related to: Inconsistent behavior for "resumed" SAML sessions (#419578 - closed)

Related to: Expire session from init (!138572)

MR acceptance checklist

Please evaluate this MR against the MR acceptance checklist. It helps you analyze changes to reduce risks in quality, performance, reliability, security, and maintainability.

Screenshots or screen recordings

image

How to set up and validate locally

  1. Configure Group SAML for a group, for example Flights and sign in - GDK howto guide
  2. After 24 hours the modal will appear. To show the modal immediately use this patch:
diff --git a/ee/app/assets/javascripts/saml_sso/components/saml_reload_modal.vue b/ee/app/assets/javascripts/saml_sso/components/saml_reload_modal.vue
index 46832247d3a9..312a2f5afb9e 100644
--- a/ee/app/assets/javascripts/saml_sso/components/saml_reload_modal.vue
+++ b/ee/app/assets/javascripts/saml_sso/components/saml_reload_modal.vue
@@ -22,7 +22,7 @@ export default {
     };
   },
   async created() {
-    const session = await getExpiringSamlSession({ samlProviderId: this.samlProviderId });
+    const session = { timeRemaingMs: 1000 };
 
     if (session) {
       setTimeout(() => {
Edited by Eduardo Sanz García

Merge request reports