# X_VERIFICATION_PURPOSE_INVALID

## Means

a verification purpose was declared twice or without a template

## Typical cause

defineVerificationPurpose() was handed a name already declared, an empty name or no template

## Fix

`defineVerificationPurpose({ name: '<unique-name>', template: 'auth.<name>', ttlMs })`

[Auth and sessions](/error-codes#auth-and-sessions)
