@auth/sequelize-adapter
Official Sequilize adapter for Auth.js / NextAuth.js.
Installation
npm install next-auth @auth/sequelize-adapter sequelize
models
Re-exports models
SequelizeAdapterOptions
This is the interface of the Sequelize adapter options.
Properties
models?
optional models: Partial<{
Account: ModelCtor<AccountInstance>;
Session: ModelCtor<SessionInstance>;
User: ModelCtor<UserInstance>;
VerificationToken: ModelCtor<VerificationTokenInstance>;
}>;
The Sequelize Models related to Auth.js that will be created in your database.
Type declaration
Account
Account: ModelCtor<AccountInstance>;
Session
Session: ModelCtor<SessionInstance>;
User
User: ModelCtor<UserInstance>;
VerificationToken
VerificationToken: ModelCtor<VerificationTokenInstance>;
synchronize?
optional synchronize: boolean;
Whether to synchronize the models or not.
default()
default(client, options?): Adapter
Parameters
Parameter | Type |
---|---|
client | Sequelize |
options ? | SequelizeAdapterOptions |