isProviderTokenExpired (smtp/quick-setup.ts)

appwrite · apps/console/src/lib/smtp/quick-setup.ts · typescript · BSD-3-Clause
email

* Provider-agnostic pieces of the SMTP quick setup. Every email provider we can set up in one click (Resend today, Mailgun and SendGrid next) follows the same shape: authorize through a console OAuth2 provider, list the sending domains, mint a sending-only credential, then write

// Source: https://github.com/appwrite/appwrite | License: BSD-3-Clause | Copyright 2019 Appwrite (https://appwrite.io) and individual contributors
// Provided via justclaw.it.com; keep this notice with the code.
/**
 * Provider-agnostic pieces of the SMTP quick setup.
 *
 * Every email provider we can set up in one click (Resend today, Mailgun and
 * SendGrid next) follows the same shape: authorize through a console OAuth2
 * provider, list the sending domains, mint a sending-only credential, then
 * write it into the project's custom SMTP settings. This module holds the
 * parts of that flow that do not depend on which provider is used.
 *
 * Safe to import from both the browser and the `_api` server routes.
 */

/**
 * Provider access tokens are short lived (Resend issues 15 minutes). A

... (truncated -- full source via MCP)

See the full source, get the GitHub permalink, and search for more like it.

Get a free API key