next-auth icon indicating copy to clipboard operation
next-auth copied to clipboard

Custom OIDC provider and opaque accessToken expiration

Open xennialex opened this issue 5 years ago • 0 comments

Question 💬

Hi!

We are using Next.JS with Next-Auth for the frontend and a .NET Core Web API for the backend. The login is a OIDC provider (Shibboleth) which returns an opaque (non JWT) accessToken (we store this in the session) that we pass as Bearer header to our backend. The backend then gets the userinfo from OIDC with the token.

Now our problem is, that the OIDC accessToken is only valid for 10 minutes and Next-Auth seems not to check if this is still valid. Our backend will give us an 401 error like this.

How should the correct handling for a case like this be?

Best regards, Alexander

How to reproduce ☕️

can't really say

Contributing 🙌🏽

No, I am afraid I cannot help regarding this

xennialex avatar Nov 23 '21 10:11 xennialex