Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
nunogois and thomasheartman committed May 24, 2023
1 parent 540c5f2 commit ab4ff29
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
1 change: 1 addition & 0 deletions src/lib/error/unleash-error.test.ts
Expand Up @@ -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',
Expand Down
1 change: 1 addition & 0 deletions src/lib/types/authentication-required.ts
Expand Up @@ -39,6 +39,7 @@ class AuthenticationRequired extends UnleashError {
...super.toJSON(),
path: this.path,
type: this.type,
defaultHidden: this.defaultHidden,
...(this.options ? { options: this.options } : {}),
};
}
Expand Down

0 comments on commit ab4ff29

Please sign in to comment.