Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 1e62c51a authored by Dhruv Puri's avatar Dhruv Puri
Browse files

Revert "fix(login): skip the loginflowv2 grant page"

This reverts commit 104c27f1.
parent 104c27f1
Loading
Loading
Loading
Loading
+9 −5
Original line number Diff line number Diff line
@@ -1815,12 +1815,16 @@ a.legal {
    color: #ffffff;
}

/* Skip the loginflowv2 grant page (per workspace#19 review): hide the form
   so the user doesn't see the orange "Grant access" button flash before
   custom-login.js auto-submits it. The form already carries the CSRF and
   state tokens. To revert, drop this rule and the matching JS block. */
/* Center the "Grant access" submit button on the loginflowv2 grant page.
   `#submit-wrapper` is a 260px-wide flex container; push it to the
   horizontal center with auto margins so it doesn't sit flush-left
   inside the picker-window. */
#body-login .picker-window #redirect-link {
    visibility: hidden;
    text-align: center;
}
#body-login .picker-window #submit-wrapper {
    margin-left: auto !important;
    margin-right: auto !important;
}

@media(prefers-color-scheme: dark){
+0 −8
Original line number Diff line number Diff line
@@ -45,13 +45,5 @@ document.addEventListener('DOMContentLoaded', function() {
			loginWithDeviceLink.click();
		}
	}
	// Skip the loginflowv2 grant page (workspace#19): auto-submit the
	// existing CSRF + state-token form so the user never sees the orange
	// "Grant access" confirmation step. Paired with a `visibility: hidden`
	// on #redirect-link in guest.css. Revert by removing both blocks.
	if (/\/login\/v2\/grant(\b|$)/.test(window.location.pathname)) {
		var grantForm = document.querySelector('#redirect-link form');
		if (grantForm) { grantForm.submit(); }
	}
})