question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

rememberMe unused in NbAuthService

See original GitHub issue

Hi Akveo,

I see that when using NbAuthService for login: authService.authenticate('provider', 'data)...

The rememberMe checkbox (from your NbLoginComponent) is never checked before saving the token into TokenService https://github.com/akveo/nebular/blob/893d56adfe56a0d4f6e8fe9b9591a20e3bafade4/src/framework/auth/services/auth.service.ts#L134

Result: token is always saved (even if checkbox not checked). So when I close my browser and visit again, I’m still logged (token is still here because I did not logout).

Is this normal behavior ?

Issue Analytics

  • State:open
  • Created 6 years ago
  • Reactions:6
  • Comments:7

github_iconTop GitHub Comments

7reactions
StefanNienhuiscommented, Mar 18, 2020

This issue has been inactive for more than a year, but hasn’t been solved. I would like to see @ThrownLemon’s solution implemented, or else it probably should be documented somewhere that this checkbox does nothing.

1reaction
prashantidealittechnocommented, Dec 10, 2018

How does the remember me is working and how it will work if there is a method for saving the token in localStorage or sessionStorage?

Remember me also display even after setting

    rememberMe: false,   // whether to show or not the `rememberMe` checkbox

It must be hidden if we set the value false.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Nebular - after login not getting token payload properly
All the data you want to get back from payload should be encoded at the time you create your jwt token : jwt.sign({...
Read more >
NbAuthService - Nebular
Customizable Angular UI Library based on Eva Design System with 40+ UI components, 4 visual themes, Auth and Security modules.
Read more >
@nebular/auth@10.0.0 - jsDocs.io
Sets a token into the storage. This method is used by the NbAuthService automatically. Parameter token. Returns. {Observable} ...
Read more >
Nebular Authorization Problem (Always Successful Login ...
rememberMe : false, // whether to show or not the `rememberMe` checkbox showMessages: ... constructor(protected service: NbAuthService) { } login(): void ...
Read more >
Passing dynamic object to an angular module's forRoot()
This will be used, under the hood, to instantiate the MyServiceOptions ... set it to 'GET', but it's not security // rememberMe: true, ......
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found