mirror of
https://github.com/mauriceboe/TREK.git
synced 2026-11-26 06:37:33 +00:00
feat(auth): let admins keep the login page on OIDC-only instances (#2925)
A new app setting oidc_auto_redirect (default on) is part of the admin form and the public app config. Off, an instance without password login no longer sends visitors straight to the IdP: the login page shows its SSO button, also while the cached config is read. Admin toggle on desktop and phone.
This commit is contained in:
@@ -82,6 +82,7 @@ describe('MAdminSettingsSection', () => {
|
||||
|
||||
expect(screen.queryByRole('switch', { name: 'SSO Login' })).not.toBeInTheDocument();
|
||||
expect(screen.queryByRole('switch', { name: 'SSO Auto-Provisioning' })).not.toBeInTheDocument();
|
||||
expect(screen.queryByRole('switch', { name: 'Go straight to SSO' })).not.toBeInTheDocument();
|
||||
});
|
||||
|
||||
it('FE-MOB-ASET-003: an env override disables the password toggles and shows the hint', () => {
|
||||
@@ -126,6 +127,11 @@ describe('MAdminSettingsSection', () => {
|
||||
'oidc_registration', true, admin.setOidcRegistration,
|
||||
);
|
||||
|
||||
await user.click(toggle('Go straight to SSO'));
|
||||
expect(admin.handleToggleAuthSetting).toHaveBeenCalledWith(
|
||||
'oidc_auto_redirect', false, admin.setOidcAutoRedirect,
|
||||
);
|
||||
|
||||
await user.click(toggle('Enable passkey login'));
|
||||
expect(admin.handleToggleAuthSetting).toHaveBeenCalledWith('passkey_login', true, admin.setPasskeyLogin);
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user