lib/entities
帐户
实现
RemoveIndex<AdapterAccount>
构造函数
new Account(undefined)
new Account(): Account返回
属性
access_token?
optional access_token: string;实现
RemoveIndex.access_token
expires_at?
optional expires_at: number;实现
RemoveIndex.expires_at
id
id: string;id_token?
optional id_token: string;实现
RemoveIndex.id_token
提供者
provider: string;实现
RemoveIndex.provider
providerAccountId
providerAccountId: string;实现
RemoveIndex.providerAccountId
refresh_token?
optional refresh_token: string;实现
RemoveIndex.refresh_token
scope?
optional scope: string;实现
RemoveIndex.scope
session_state?
optional session_state: JsonValue;token_type?
optional token_type: Lowercase<string>;实现
RemoveIndex.token_type
类型
type: AdapterAccountType;实现
RemoveIndex.type
用户
user: User;userId
userId: string;实现
RemoveIndex.userId
会话
会话保存关于用户当前登录状态的信息。
实现
构造函数
new Session(undefined)
new Session(): Session返回
属性
过期时间
expires: Date;会话过期时的绝对日期。
如果在会话过期日期之前访问了会话,它将根据 maxAge 选项进行扩展,该选项由 SessionOptions.maxAge 定义。在 SessionOptions.updateAge 定义的时间段内,它最多只能扩展一次。
如果在会话过期日期之后访问了会话,它将从数据库中删除,以清理非活动会话。
实现
id
id: string;sessionToken
sessionToken: string;一个随机生成的值,用于在使用 "database" AuthConfig.strategy 选项时在数据库中查找会话。此值保存在客户端上的安全、HTTP-Only Cookie 中。
实现
用户
user: User;userId
userId: string;将活动会话连接到数据库中的用户
实现
用户
实现
RemoveIndex<AdapterUser>
构造函数
new User(undefined)
new User(): User返回
属性
accounts
accounts: Collection<Account, object>;email: string = "";实现
RemoveIndex.email
emailVerified
emailVerified: null | Date = null;实现
RemoveIndex.emailVerified
id
id: string;实现
RemoveIndex.id
image?
optional image: null | string;实现
RemoveIndex.image
name?
optional name: null | string;实现
RemoveIndex.name
sessions
sessions: Collection<Session, object>;VerificationToken
验证令牌是一个临时令牌,用于通过用户的电子邮件地址登录用户。当用户使用 电子邮件提供商 登录时创建。当用户点击电子邮件中的链接时,令牌和电子邮件将被发送回服务器,在那里对其进行哈希处理并与数据库中的值进行比较。如果令牌和电子邮件匹配,并且令牌尚未过期,则用户将登录。然后从数据库中删除该令牌。
实现
构造函数
new VerificationToken(undefined)
new VerificationToken(): VerificationToken返回
属性
expires
expires: Date;令牌到期的绝对日期。
实现
identifier
identifier: string;用户的电子邮件地址。
实现
token
token: string;使用 AuthConfig.secret 值的 哈希 令牌。