UNPKG

@bitblit/ratchet-warden-server

Version:

Typescript library to simplify using simplewebauthn and secondary auth methods over GraphQL

14 lines 565 B
export class WardenDefaultSendMagicLinkCommandValidator { async allowMagicLinkCommand(cmd, _origin, _loggedInUser) { if (!cmd) { throw new Error('Cannot process null magic link'); } if (cmd.ttlSeconds && cmd.ttlSeconds > 3600) { throw new Error('TTL may not exceed 3600 seconds'); } if (cmd.overrideDestinationContact) { throw new Error('You may not specify an overrideDestinationContact'); } } } //# sourceMappingURL=warden-default-send-magic-link-command-validator.js.map