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

Add support for fastify-passport package #1655

Open
1 task done
Niewdanka opened this issue May 15, 2024 · 5 comments
Open
1 task done

Add support for fastify-passport package #1655

Niewdanka opened this issue May 15, 2024 · 5 comments

Comments

@Niewdanka
Copy link

Niewdanka commented May 15, 2024

Is there an existing issue that is already proposing this?

  • I have searched the existing issues

Is your feature request related to a problem? Please describe it

Hi! Based on this thread fastify/help#382 it seems that fastify-passport package is stable and can help resolve the problem related to this issue nestjs/nest#5702 . While the workaround mentioned in issue works i believe this package could also help resolve the problem.

Describe the solution you'd like

Add support for fastify-passport package.

Teachability, documentation, adoption, migration strategy

none

What is the motivation / use case for changing the behavior?

none

@olawalejuwonm
Copy link

Any update on this please?

@d6nn9
Copy link

d6nn9 commented Sep 27, 2024

app.getHttpAdapter().getInstance().decorateReply('setHeader', function (key, value) { this.raw.setHeader(key, value); });
app.getHttpAdapter().getInstance().decorateReply('end', function () { this.raw.end(); });

@dfenerski
Copy link

app.getHttpAdapter().getInstance().decorateReply('setHeader', function (key, value) { this.raw.setHeader(key, value); });
app.getHttpAdapter().getInstance().decorateReply('end', function () { this.raw.end(); });

The key issue is native support for passport's guards & strategies.

@songkeys
Copy link

I'd like to help work on this.

But I found that:

  1. fastify-passport is a direct port from passport
  2. passport is a peer dependency of @nest/passport and the api was used in the code

How do you think we should bring fastify-passport in without interupting express's passport? Maybe we should make them optional and let user to pass in the passport instance?

@SzymonGonet
Copy link

When do we know when this has been done?

Once `fastify-passport` becomes stable, we'll add support for it in the `@nestjs/passport` package.

Originally posted by @kamilmysliwiec in #5702 (comment)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

6 participants