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

refactor(auth): require valid token by default #2259

Merged
merged 1 commit into from
Mar 6, 2020
Merged

refactor(auth): require valid token by default #2259

merged 1 commit into from
Mar 6, 2020

Conversation

yggg
Copy link
Contributor

@yggg yggg commented Mar 6, 2020

Please read and mark the following check list before creating a pull request:

Short description of what this resolves:

Closes #1246.

BREAKING CHANGE:
requireValidToken set to true by default.
Now if response contains invalid token NbAuthIllegalTokenError is thrown.
To enable old behavior, set requireValidToken: false in the auth strategy method config, e.g.:

NbPasswordAuthStrategy.setup({
  // ...
  login: {
    // ...
    requireValidToken: false,
  },
});

or

NbOAuth2AuthStrategy.setup({
  // ...
  authorize: {
    // ...
    requireValidToken: false,
  },
});

@yggg yggg requested a review from nnixaa March 6, 2020 12:48
Copy link
Collaborator

@nnixaa nnixaa left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

@codecov
Copy link

codecov bot commented Mar 6, 2020

Codecov Report

Merging #2259 into master will decrease coverage by 0.04%.
The diff coverage is n/a.

@@            Coverage Diff             @@
##           master    #2259      +/-   ##
==========================================
- Coverage   81.65%   81.61%   -0.05%     
==========================================
  Files         244      244              
  Lines        7359     7359              
  Branches      771      771              
==========================================
- Hits         6009     6006       -3     
- Misses       1122     1126       +4     
+ Partials      228      227       -1
Impacted Files Coverage Δ
...ramework/auth/strategies/oauth2/oauth2-strategy.ts 83.57% <ø> (ø) ⬆️
...h/strategies/password/password-strategy-options.ts 100% <ø> (ø) ⬆️
.../auth/strategies/oauth2/oauth2-strategy.options.ts 100% <ø> (ø) ⬆️
...work/auth/strategies/password/password-strategy.ts 97.59% <ø> (ø) ⬆️
...ramework/theme/components/toastr/toastr.service.ts 94.78% <0%> (-2.61%) ⬇️

@yggg yggg merged commit bc68d11 into akveo:master Mar 6, 2020
@yggg yggg deleted the refactor/auth-require-valid-token-by-default branch March 6, 2020 13:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Auth require valid token by default
2 participants