Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bug Forms RememberMe boolean is not being used in Login.Component #330

Closed
1 task
DaniVSainz opened this issue Mar 27, 2018 · 2 comments · Fixed by #644
Closed
1 task

Bug Forms RememberMe boolean is not being used in Login.Component #330

DaniVSainz opened this issue Mar 27, 2018 · 2 comments · Fixed by #644

Comments

@DaniVSainz
Copy link

DaniVSainz commented Mar 27, 2018

Issue type

I'm submitting a ... (check one with "x")

  • [X ] bug report
  • feature request

Issue description

Current behavior:
Remember me option is being unused inside of login.component.ts causing it to be shown regardless if set to false

Expected behavior:
If false don't show remember me...

Steps to reproduce:
Set remember me to true

        login: {
          redirectDelay: 2000,
          rememberMe: false,   // whether to show or not the `rememberMe` checkbox
          showMessages: {     // show/not show success/error messages
            success: true,
            error: true,
          }
        },

Related code:
Nebular github repo:
https://github.com/akveo/nebular/blob/master/src/framework/auth/components/login/login.component.ts

It isnt checking or even getting this config value, nor is there a ngIf check on the value both snippets from nebulars repo

export class NbLoginComponent {

  redirectDelay: number = 0;
  showMessages: any = {};
  provider: string = '';

  errors: string[] = [];
  messages: string[] = [];
  user: any = {};
  submitted: boolean = false;
  socialLinks: NbAuthSocialLink[] = [];

  constructor(protected service: NbAuthService,
              @Inject(NB_AUTH_OPTIONS) protected config = {},
              protected router: Router) {

    this.redirectDelay = this.getConfigValue('forms.login.redirectDelay');
    this.showMessages = this.getConfigValue('forms.login.showMessages');
    this.provider = this.getConfigValue('forms.login.provider');
    this.socialLinks = this.getConfigValue('forms.login.socialLinks');
//Should be grabbing value here? and initializing above
  }

  login(): void {...............

Nor is there a check inside of the HTML

        <div class="form-group accept-group col-sm-12">
//Should be checking value here?
          <nb-checkbox name="rememberMe" [(ngModel)]="user.rememberMe">Remember me</nb-checkbox>
          <a class="forgot-password" routerLink="../request-password">Forgot Password?</a>
        </div>
@nnixaa
Copy link
Collaborator

nnixaa commented Mar 30, 2018

Hey @DaniVSainz, thanks for reporting!

@denisobrienirl
Copy link

Folks, mind including this one in the next release? Would be nice to have it available at the same time the disappearing Login sub-menu items fix. :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants