GithubHelp home page GithubHelp logo

Comments (4)

kamilmysliwiec avatar kamilmysliwiec commented on April 24, 2024

Please, provide a minimal repository which reproduces your issue.

from ng-universal.

hungtcs avatar hungtcs commented on April 24, 2024

@kamilmysliwiec Yes! please clone this project, and exec yarn run serve to start, then click the button Request Without Token.
response status code is 401, but the error in server side is :

Unhandled Promise rejection: { statusCode: 401, error: 'Unauthorized' } ; Zone: <root> ; Task: Promise.then ; Value: { Error: [object Object]
    at MixinAuthGuard.handleRequest (/home/hungtcs/Workspaces/@temp/nest-universal-test/node_modules/@nestjs/passport/dist/auth.guard.js:63:30)
    at passportFn (/home/hungtcs/Workspaces/@temp/nest-universal-test/node_modules/@nestjs/passport/dist/auth.guard.js:47:120)
    at passport.authenticate (/home/hungtcs/Workspaces/@temp/nest-universal-test/node_modules/@nestjs/passport/dist/auth.guard.js:78:24)
    at allFailed (/home/hungtcs/Workspaces/@temp/nest-universal-test/node_modules/passport/lib/middleware/authenticate.js:107:18)
    at attempt (/home/hungtcs/Workspaces/@temp/nest-universal-test/node_modules/passport/lib/middleware/authenticate.js:180:28)
    at JwtStrategy.strategy.fail (/home/hungtcs/Workspaces/@temp/nest-universal-test/node_modules/passport/lib/middleware/authenticate.js:297:9)
    at JwtStrategy.authenticate (/home/hungtcs/Workspaces/@temp/nest-universal-test/node_modules/passport-jwt/lib/strategy.js:96:21)
    at attempt (/home/hungtcs/Workspaces/@temp/nest-universal-test/node_modules/passport/lib/middleware/authenticate.js:361:16)
    at authenticate (/home/hungtcs/Workspaces/@temp/nest-universal-test/node_modules/passport/lib/middleware/authenticate.js:362:7)
    at Promise (/home/hungtcs/Workspaces/@temp/nest-universal-test/node_modules/@nestjs/passport/dist/auth.guard.js:83:3)
  response: { statusCode: 401, error: 'Unauthorized' },
  status: 401,
  message: { statusCode: 401, error: 'Unauthorized' } } Error: [object Object]
    at MixinAuthGuard.handleRequest (/home/hungtcs/Workspaces/@temp/nest-universal-test/node_modules/@nestjs/passport/dist/auth.guard.js:63:30)
    at passportFn (/home/hungtcs/Workspaces/@temp/nest-universal-test/node_modules/@nestjs/passport/dist/auth.guard.js:47:120)
    at passport.authenticate (/home/hungtcs/Workspaces/@temp/nest-universal-test/node_modules/@nestjs/passport/dist/auth.guard.js:78:24)
    at allFailed (/home/hungtcs/Workspaces/@temp/nest-universal-test/node_modules/passport/lib/middleware/authenticate.js:107:18)
    at attempt (/home/hungtcs/Workspaces/@temp/nest-universal-test/node_modules/passport/lib/middleware/authenticate.js:180:28)
    at JwtStrategy.strategy.fail (/home/hungtcs/Workspaces/@temp/nest-universal-test/node_modules/passport/lib/middleware/authenticate.js:297:9)
    at JwtStrategy.authenticate (/home/hungtcs/Workspaces/@temp/nest-universal-test/node_modules/passport-jwt/lib/strategy.js:96:21)
    at attempt (/home/hungtcs/Workspaces/@temp/nest-universal-test/node_modules/passport/lib/middleware/authenticate.js:361:16)
    at authenticate (/home/hungtcs/Workspaces/@temp/nest-universal-test/node_modules/passport/lib/middleware/authenticate.js:362:7)
    at Promise (/home/hungtcs/Workspaces/@temp/nest-universal-test/node_modules/@nestjs/passport/dist/auth.guard.js:83:3)

from ng-universal.

twittwer avatar twittwer commented on April 24, 2024

We ran into a similar problem and it seems to be caused by the following issue from the angular zone:
angular/angular#31680

from ng-universal.

kamilmysliwiec avatar kamilmysliwiec commented on April 24, 2024

This doesn't seem to be related to NestJS.

Leaving it here for future reference: this package is supposed to be a tiny wrapper on top of @nguniversal/express-engine. If anyone needs more functionalities, we recommend forking this package and bringing it to the project's codebase.

from ng-universal.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.