Skip to content

Commit

Permalink
fix logout error
Browse files Browse the repository at this point in the history
  • Loading branch information
tim-fabian committed May 9, 2023
1 parent 62dc4e4 commit bf8ce71
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 12 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "lbx-jwt",
"description": "Provides JWT authentication for loopback applications. Includes storing roles inside tokens and handling refreshing. Built-in reuse detection.",
"version": "1.0.5",
"version": "1.0.6",
"keywords": [
"lb4",
"LoopBack",
Expand Down
18 changes: 8 additions & 10 deletions src/controllers/auth/auth.controller.ts
Original file line number Diff line number Diff line change
@@ -1,20 +1,19 @@
import { inject } from '@loopback/core';
import { IsolationLevel, juggler } from '@loopback/repository';
import { getModelSchemaRef, HttpErrors, post, requestBody } from '@loopback/rest';
import { BaseUser, BaseUserProfile, BaseUserWithRelations, Credentials, PasswordResetTokenWithRelations } from '../../models';
import { authenticate } from '@loopback/authentication';
import { BcryptUtilities } from '../../encapsulation/bcrypt.utilities';
import { EncodedJwt, JwtUtilities } from '../../encapsulation/jwt.utilities';
import { LbxJwtBindings } from '../../keys';
import { BaseUser, BaseUserProfile, BaseUserWithRelations, Credentials, PasswordResetTokenWithRelations } from '../../models';
import { BaseUserRepository, CredentialsRepository, PasswordResetTokenRepository, RefreshTokenRepository } from '../../repositories';
import { AccessTokenService, BaseUserService, RefreshTokenService } from '../../services';
import { LoginCredentials } from './login-credentials.model';
import { DefaultEntityOmitKeys, TokenObject } from '../../types';
import { EncodedJwt, JwtUtilities } from '../../encapsulation/jwt.utilities';
import { RequestResetPasswordGrant } from './request-reset-password-grant.model';
import { AuthData } from './auth-data.model';
import { ConfirmResetPassword } from './confirm-reset-password.model';
import { LoginCredentials } from './login-credentials.model';
import { RefreshGrant } from './refresh-grant.model';
import { IsolationLevel, juggler } from '@loopback/repository';
import { BaseUserRepository, CredentialsRepository, PasswordResetTokenRepository, RefreshTokenRepository } from '../../repositories';
import { RequestResetPasswordGrant } from './request-reset-password-grant.model';
import { ResetPasswordTokenGrant } from './reset-password-token-grant.model';
import { BcryptUtilities } from '../../encapsulation/bcrypt.utilities';
import { ConfirmResetPassword } from './confirm-reset-password.model';

/**
* Exposes endpoints regarding authentication and authorization (eg. Login or resetting a users password).
Expand Down Expand Up @@ -148,7 +147,6 @@ export class LbxJwtAuthController<RoleType extends string> {
*
* @param refreshGrant - The refresh token of the user that should be logged out.
*/
@authenticate('jwt')
@post(
'logout',
{
Expand Down
2 changes: 1 addition & 1 deletion tsconfig.tsbuildinfo

Large diffs are not rendered by default.

0 comments on commit bf8ce71

Please sign in to comment.