Skip to content

Commit

Permalink
fix(login): take into account remember me setting (#644)
Browse files Browse the repository at this point in the history
Fixes: #330
  • Loading branch information
yggg authored and nnixaa committed Aug 16, 2018
1 parent f16cb24 commit 22525e7
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 3 deletions.
2 changes: 2 additions & 0 deletions src/framework/auth/components/login/login.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ export class NbLoginComponent {
user: any = {};
submitted: boolean = false;
socialLinks: NbAuthSocialLink[] = [];
rememberMe = false;

constructor(protected service: NbAuthService,
@Inject(NB_AUTH_OPTIONS) protected options = {},
Expand All @@ -37,6 +38,7 @@ export class NbLoginComponent {
this.showMessages = this.getConfigValue('forms.login.showMessages');
this.strategy = this.getConfigValue('forms.login.strategy');
this.socialLinks = this.getConfigValue('forms.login.socialLinks');
this.rememberMe = this.getConfigValue('forms.login.rememberMe');
}

login(): void {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ import { HttpErrorResponse, HttpResponse } from '@angular/common/http';

export interface NbPasswordStrategyModule {
alwaysFail?: boolean;
rememberMe?: boolean;
endpoint?: string;
method?: string;
redirect?: {
Expand Down Expand Up @@ -54,7 +53,6 @@ export class NbPasswordAuthStrategyOptions extends NbAuthStrategyOptions {
};
register?: boolean | NbPasswordStrategyModule = {
alwaysFail: false,
rememberMe: true,
endpoint: 'register',
method: 'post',
requireValidToken: false,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,6 @@ import { NbAuthIllegalTokenError } from '../../services/token/token';
* };
* register?: boolean | NbPasswordStrategyModule = {
* alwaysFail: false,
* rememberMe: true,
* endpoint: 'register',
* method: 'post',
* requireValidToken: false,
Expand Down

0 comments on commit 22525e7

Please sign in to comment.