跳至内容
从 NextAuth.js v4 迁移?阅读 我们的迁移指南.
API 参考@auth/azure-tables-adapter

@auth/azure-tables-adapter

Auth.js / NextAuth.js 的官方 Azure 表格存储 适配器。

安装

npm install next-auth @auth/azure-tables-adapter

密钥

const keys: {
  account: "account";
  accountByUserId: "accountByUserId";
  session: "session";
  sessionByUserId: "sessionByUserId";
  user: "user";
  userByEmail: "userByEmail";
  verificationToken: "verificationToken";
};

类型声明

帐户

account: string = "account";

accountByUserId

accountByUserId: string = "accountByUserId";

会话

session: string = "session";

sessionByUserId

sessionByUserId: string = "sessionByUserId";

用户

user: string = "user";

userByEmail

userByEmail: string = "userByEmail";

验证令牌

verificationToken: string = "verificationToken";

TableStorageAdapter()

TableStorageAdapter(client): Adapter

参数

参数类型
客户端TableClient

返回值

适配器


withoutKeys()

withoutKeys<T>(entity): T

类型参数

类型参数
T

参数

参数类型
实体GetTableEntityResponse<TableEntityResult<T>>

返回值

T

Auth.js © Balázs Orbán 和团队 -2024