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
passport-facebook-token
doesn't work
#70
Comments
passport-facebook-token
doesn't workingpassport-facebook-token
doesn't work
Please, provide a minimal repository which reproduces your issue. |
Hi Kamil, You can find simple example here: https://github.com/ivanvs/nestjs-passport-facebook-token-example This example is not finished, so the whole flow for authentication is not implemented. I just put implementation of strategy and that implementation cannot be compiled. If you need anything else, please do not hesitate to contact me. |
any update on this issue |
@kamilmysliwiec would you be interested in PR that is fixing this issue? I can try to create a fix, and then you could review my solution. What do you think about that? |
Shouldn't this be fixed on the library (strategy) side instead? Also, are you sure that your issue isn't caused by the synthetic default import? |
It was my mistake. Sorry for wasting your time :( |
@ivanvs I bumped into exactly same issue:
I took the original package and transpiled it with @babel-plugin-transform-classes so now it returns a function. Works as expected:
|
I'm submitting a...
Current behavior
When I try to use
passport-facebook-token
library with this library I am getting this error:TypeError: Class extends value undefined is not a constructor or null
/home/mrav/projects/gitdiagram-server/node_modules/@nestjs/passport/dist/passport/passport.strategy.js:13 class MixinStrategy extends Strategy {
I am trying to use given library like this:
I think that main problem is that
passport-facebook-token
is creating strategy by extendingOAuth2Strategy
and other libraries likepassport-facebook
are usingutil.inherits
method. In node documentationutil.inherits
is deprecated.As I can see
nestjs/passport
library is expecting Strategy to be function, link to source code.Why I want to use
passport-facebook-token
strategy, because I want to implement implicit grant flow for my SPA application.I have found one more library that is creating strategy in the same way:
Expected behavior
It would be nice if library would support strategies that are created by extending
OAuth2Strategy
.Minimal reproduction of the problem with instructions
What is the motivation / use case for changing the behavior?
Environment
The text was updated successfully, but these errors were encountered: