---
title: "VerificationTokenStrategy"
generated: true
---
<GenerationInfo sourceFile="packages/core/src/config/auth/verification-token-strategy.ts" sourceLine="18" packageName="@vendure/core" since="3.2.0" />

Defines a custom strategy for creating and validating verification tokens.

:::info

This is configured via the `authOptions.verificationTokenStrategy` property of
your VendureConfig.

:::

```ts title="Signature"
interface VerificationTokenStrategy extends InjectableStrategy {
    generateVerificationToken(ctx: RequestContext): Promise<string> | string;
    verifyVerificationToken(ctx: RequestContext, token: string): Promise<boolean> | boolean;
}
```
* Extends: <DocsLink href="/reference/typescript-api/common/injectable-strategy#injectablestrategy">`InjectableStrategy`</DocsLink>



<div className="members-wrapper">

### generateVerificationToken

<MemberInfo kind="method" type={`(ctx: <a href='/reference/typescript-api/request/request-context#requestcontext'>RequestContext</a>) => `Promise<string> | string``}  since="3.2.0"  />

Generates a verification token.
### verifyVerificationToken

<MemberInfo kind="method" type={`(ctx: <a href='/reference/typescript-api/request/request-context#requestcontext'>RequestContext</a>, token: string) => `Promise<boolean> | boolean``}  since="3.2.0"  />

Checks the validity of a verification token.


</div>
