Skip to content

basalt / auth/src / AccountLinkStore

Interface: AccountLinkStore ​

Defined in: auth/src/stores.ts:127

Methods ​

create() ​

> create(link): Promise<boolean>

Defined in: auth/src/stores.ts:135

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 ​

AccountLink

Returns ​

Promise<boolean>


deleteAllForUser() ​

> deleteAllForUser(userId): Promise<void>

Defined in: auth/src/stores.ts:140

Drops every link of a user — fired when an unverified account is adopted.

Parameters ​

userId ​

string

Returns ​

Promise<void>


find() ​

> find(provider, subject): Promise<AccountLink | null>

Defined in: auth/src/stores.ts:129

The link for (provider, subject), or null.

Parameters ​

provider ​

string

subject ​

string

Returns ​

Promise<AccountLink | null>


forUser() ​

> forUser(userId): Promise<AccountLink[]>

Defined in: auth/src/stores.ts:137

Every link of a user (any provider).

Parameters ​

userId ​

string

Returns ​

Promise<AccountLink[]>


remove() ​

> remove(provider, subject): Promise<void>

Defined in: auth/src/stores.ts:138

Parameters ​

provider ​

string

subject ​

string

Returns ​

Promise<void>

Released under the MIT License.