IdentityBase
Document shape for an OAuth provider link attached to a user. Stores the provider name, the
provider-scoped identity ID, optional token fields, and the token expiry date. Lives as an element
of the embedded users.identities[] array — the standalone NextAuth-era identities table was
dropped after the Clerk auth migration; the per-user embedded list is the surviving home for a
user's OAuth provider links.
Definition
type IdentityBase = BaseDocument & { accessToken: string; expiresAt: Date; identity: string; provider: string; refreshToken: string; scope: string };BaseDocument & { accessToken: string; expiresAt: Date; identity: string; provider: string; refreshToken: string; scope: string }
Example
import type { IdentityBase } from '@nordcom/commerce-db';
function isExpired(identity: IdentityBase): boolean {
return identity.expiresAt != null && identity.expiresAt < new Date();
}Related
FeatureFlagService ReviewService ShopService FeatureFlagOption FeatureFlagRef ResolvedCartLineTokens ResolvedProductCardTokens ResolvedShopTheme
Identifiable
Marks an entity as having a URLsafe handle slug. Types that satisfy this contract can be passed to slugbased lookup and routing utilities.
isQuotedProductCardKey
Reports whether a productcard knob's value is logical content the serializer wraps in CSS quotes on emit (imageSizes, the CTApill label/icon, the salebadge text