What is the best approach for okta authentication with Next.js?

I am trying to implement authentication on a Next.js app and browsing online I can see lot of them has suggested Auth.js (https://authjs.dev/) but the problem I have is I want to use Okta signin widget along with Auth.js and none of the online repository/article has used Auth.js along with Okta signin widget.

What is the best approach here? Can I use Auth.js along with Okta sign in widget or just using Okta sign in widget is enough to implement authentication on Nextjs?

At this time, we do not have an up-to-date official sample to guide you through this implementation, however this guide and repo are still available (but is quite a bit outdated). I would suggest submitting a request for this to Okta Ideas, keeping in mind we would need two types of documentation based on which version of Nextjs — Hydration or Client-side.

That said, this can definitely be implemented, but we will only be able to support issues related to Okta Authjs if you do.


This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.