I have tried to modify the existing adapter @ https://www.sanity.io/plugins/next-auth-sanity to be compatible with Next-Auth V4 to no avail.
As I have read that Next-Auth V4 introduces some breaking changes to all existing adapters.
Has anyone integrated Next-Auth with Sanity.io for the EmailProvider option successfully with a custom adapter?
This is a piece of code (from the current next-auth-sanity library) which I believe is having some issues with next-Auth V4.
import { Profile, Session } from 'next-auth';
import { Adapter } from 'next-auth/adapters';
import { User } from 'next-auth';
import { SanityClient } from '@sanity/client';
export default function SanityAdapter(SanityClient, options = {never, User & {
id: string;
}, Profile, Session}) {
return {
}
}
The adapter documentation from next-auth is quite basic @ Next-Auth Adapter documentation