nextauthjs / nextauthjs/next-auth

Next.js 14 does not show pdf as static with next-auth

Open
#9,101 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug triage
Dominant language
TypeScript
Stars
28.4k
Forks
4k
PR merge metrics
No merged PRs in 30d

Description

Environment

Next.js 14.0.1
next-auth Beta 5

Sql postgress on vercel

Reproduction URL

https://github.com/VittorioMorellini/dashboard

Describe the issue

Whan I try to show the static asset (Resume.pdf) If I am logged in, the program opens a new tab on the home page.
It does not show the static asset pdf, my resume.

It seems a problem of next-auth Beta version

How to reproduce

https://dashboard-vittoriomorellini.vercel.app/dashboard/resume

Go to this link and click to: "Download resume", it is a Link next to a static pdf file.
It should open a new tab with the pdf. It works if I am not logged in:

https://dashboard-vittoriomorellini.vercel.app

But if I am logged in it does not work; it does not open the static asset (pdf file)

Expected behavior

It should open a new tab in the browser to show the PDF file and you can download it from the new Tab

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing the behavior at the provided dashboard URL with and without a logged-in session, using the Next.js 14.0.1 and next-auth beta 5 environment described. Compare the "Download resume" link behavior for Resume.pdf; done means the PDF opens in a new browser tab for logged-in users as well as logged-out users.

Written by the indexing model from the issue text.

Assessment

Tech stack
nextjs, postgresql, typescript
Domain
authentication, web-dev
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.