1
0
mirror of https://github.com/Unleash/unleash.git synced 2025-01-25 00:07:47 +01:00

fix: hide password login when it's disabled (#3851)

https://linear.app/unleash/issue/2-1085/bug-password-based-login-still-shows-on-the-login-page-even-if

Fixes a regression introduced with the changes related with #3633 where
we still show the password login even though it's disabled.

---------

Co-authored-by: Thomas Heartman <thomas@getunleash.io>
This commit is contained in:
Nuno Góis 2023-05-24 09:39:24 +01:00 committed by GitHub
parent 540c5f2cc5
commit ab4ff29407
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 0 deletions

View File

@ -374,6 +374,7 @@ describe('Error serialization special cases', () => {
type: 'password',
path: `base-path/auth/simple/login`,
message: 'You must sign in order to use Unleash',
defaultHidden: true,
options: [
{
type: 'google',

View File

@ -39,6 +39,7 @@ class AuthenticationRequired extends UnleashError {
...super.toJSON(),
path: this.path,
type: this.type,
defaultHidden: this.defaultHidden,
...(this.options ? { options: this.options } : {}),
};
}