Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

with-passport-and-next-connect redefines response end function as async #51628

Copy link
Copy link
Closed as not planned
@ntaranov

Description

@ntaranov
Issue body actions

Verify canary release

  • I verified that the issue exists in the latest Next.js canary release

Provide environment information

---

Which example does this report relate to?

with-passport-and-next-connect

What browser are you using? (if relevant)

No response

How are you deploying your application? (if relevant)

No response

Describe the Bug

Here in with-passport-and-next-connect end function is defined as async. This cannot be correct as it's called without await by the framework creating a race condition.

This is a result of

  • Trying to override sync end
  • Using async @hapi\iron apis

Expected Behavior

This can be fixed either by saving the session somewhere else or by using a sync cryptography API.

To Reproduce

Run the example, see API resolved without sending a response for /api/auth/session, this may result in stalled requests. in the console.

Metadata

Metadata

Assignees

No one assigned

    Labels

    examplesIssue was opened via the examples template.Issue was opened via the examples template.good first issueEasy to fix issues, good for newcomersEasy to fix issues, good for newcomersstaleThe issue has not seen recent activity.The issue has not seen recent activity.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      Morty Proxy This is a proxified and sanitized view of the page, visit original site.