Next.js Discord

Discord Forum

Trouble with Notion auth - authjs.dev v5

Unanswered
Rhinelander posted this in #help-forum
Open in Discord
RhinelanderOP
Hey, I've run in to the issue.

I've integrated Github, Google, etc... with ease

But Notion is giving me headache.

I did the usual set up provider, added api route /api/auth/[...nextauth]

When I click on signin button I get redirected to notion hosted auth page. I select pages that I want to give access to and then get reddirected back to my app.

Works fine, but when I try auth() I get error as user is not singed in (error shown on image).

Also what do I do with the code. I read some stuff about it in the Notion docs but not really sure ( i guess you can access profile?).

Next part is notion specific if someone might know just in case.

How do i access pages of user that gave me access to them after they singed in.

1 Reply

RhinelanderOP