basalt / auth/src / MemoryAccountLinkStore
Class: MemoryAccountLinkStore
Defined in: auth/src/stores.ts:146
Implements
Constructors
Constructor
> new MemoryAccountLinkStore(): MemoryAccountLinkStore
Returns
MemoryAccountLinkStore
Methods
create()
> create(link): Promise<boolean>
Defined in: auth/src/stores.ts:154
Inserts the link. MUST be atomic on (provider, subject): when a link for that pair already exists (for any user) nothing is written and false is returned — two concurrent first logins cannot both bind the subject.
Parameters
link
Returns
Promise<boolean>
Implementation of
deleteAllForUser()
> deleteAllForUser(userId): Promise<void>
Defined in: auth/src/stores.ts:166
Drops every link of a user — fired when an unverified account is adopted.
Parameters
userId
string
Returns
Promise<void>
Implementation of
AccountLinkStore.deleteAllForUser
find()
> find(provider, subject): Promise<AccountLink | null>
Defined in: auth/src/stores.ts:149
The link for (provider, subject), or null.
Parameters
provider
string
subject
string
Returns
Promise<AccountLink | null>
Implementation of
forUser()
> forUser(userId): Promise<AccountLink[]>
Defined in: auth/src/stores.ts:160
Every link of a user (any provider).
Parameters
userId
string
Returns
Promise<AccountLink[]>
Implementation of
remove()
> remove(provider, subject): Promise<void>
Defined in: auth/src/stores.ts:163
Parameters
provider
string
subject
string
Returns
Promise<void>