How long does the Cloudflare sign-in last?
About an hour — shorter than you are probably expecting, and Cloudflare offers no way to extend it.
Cloudflare signs third-party OAuth clients with a short-lived access token — about an hour — and returns no refresh token. Its scope catalogue has no offline_access, so there is nothing to ask for: after roughly an hour the bearer is spent and the only cure is a fresh consent.
We do not paper over that. The lifetime is enforced in four places, and none of them depends on you or on us remembering something:
- The expiry is stamped into the stored record itself, capped to the token’s own lifetime rather than to anything longer.
- Cloudflare’s key-value store deletes the grant when the window closes.
- Nothing depends on you remembering to revoke anything, or on us running a cleanup job.
- Nothing claims a duration longer than Cloudflare actually grants us.
What does the grant give you, and what does it touch?
A fixed scope list, shown on Cloudflare’s own consent screen — and nothing that ever becomes a secret in your clipboard.
- Nothing is pasted. The old flow asked you to go to dash.cloudflare.com, hand-craft a permission list in a dashboard form, and then paste a secret into a web app. The OAuth path asks Cloudflare to show you its own consent screen listing the scopes, and you click approve.
- Nothing is copied. The credential never touches your clipboard, your password manager, or a chat window.
- Nothing long-lived is kept. Flowmails never stores a long-lived credential for your account.
The scope list itself is walked through in our permissions walkthrough. Nothing was loosened to make sign-in possible; the list is short because the shared-worker architecture needs far less than the old per-account worker did.
What breaks when the grant expires?
Nothing that carries mail — only the next action that has to reach into your account.
When the window closes, your mail keeps flowing. The shared worker and the thin sender worker both keep running. What stops working is the next action that needs to reach into your account:
- Deploying the sender worker.
- Turning sending on for a domain whose transport is Cloudflare Email Sending.
- Repairing that domain’s sending DNS — the records Cloudflare re-applies for the sending subdomain.
At that point the dashboard offers you the same one-click sign-in again, and says plainly that it expired rather than claiming your credential was invalid.
Adding a domain is not on that list, and that is the point of the DNS-first flow: the two records go into your own zone, so the platform never needs your account to receive your mail.
Is the sign-in a refresh token?
No — it is not, and that is deliberate. One claim is worth retracting before you assume it.
- It is not a refresh token. Some OAuth providers hand back a renewable credential so the user is never asked again. Cloudflare sends none, and Flowmails discards one if a future version ever does.
- A stored refresh token would turn an hour-long credential into an indefinitely renewable one for anyone who ever read our key-value store.
- That is a strictly worse outcome for you than re-clicking a consent screen.
Can you delete a domain after the grant has expired?
Yes. Deleting a domain finishes on our side whether or not a grant is live, and the only things that can be left behind are the ones that live in your Cloudflare account.
The delete has two halves. Ours removes the domain from the platform, takes its tenant out of the shared mailstore, retires the route table and schedules the mailbox’s purge — none of which needs a credential from you. Yours is whatever the grant exists for: the thin sender worker the platform deployed into your account, the sending subdomain’s DNS records, and, on a domain from the forwarding era, the provider-side rule that points the zone at a Flowmails routing address.
- The delete completes and tells you what it could not finish, so an expired grant is never a locked door.
- What is left behind keeps doing something. The sender worker still accepts the platform’s sends while it exists, and a legacy forwarding rule still routes mail — which is why the list matters rather than being a footnote.
- The two inbound records are yours. They live in your zone and no credential of ours can touch them: remove the MX and the TTL’d TXT at your DNS host, and the domain is fully free of Flowmails.
Why does Flowmails not keep a long-lived credential for you?
Because a long-lived Cloudflare API token in our database is a standing liability, and the grant inverts that.
- It survives your password rotation.
- It outlives the person who pasted it.
- A breach of our database would hand an attacker every account that ever connected.
The grant inverts that — the credential has a bounded lifetime, it is never persisted beyond that lifetime, and the platform’s own database holds no third-party secret at all.
Outbound sending needed the same treatment, which is why the platform deploys a ~120-line thin sender worker into your own account rather than asking you for an Email Sending permission on a shared credential. The sender worker holds the send_email binding and nothing else; the platform calls it over HTTPS with a bearer secret it minted at deploy time.
When is the sign-in asked for, and is there another way?
Only when you pick Cloudflare as the transport for a domain’s outgoing mail. Receiving never asks for it, and the Flowmails sending channel does not either.
- Receiving a domain: no sign-in. Two records in your own zone, detected and verified over public DNS. Your DNS host can be Cloudflare, GoDaddy, Namecheap or anything else.
- Cloudflare Email Sending: sign in with Cloudflare. That is the supported path for this transport, and it is the only credential the platform accepts for it: no secret to paste, no secret to rotate, no secret of yours sitting in a third party’s database.
- Re-sign in when it expires. If you come back to the dashboard more than an hour later and an action needs your account, you will be offered the one-click consent again. That is the whole cost.
The sign-in happens inside the dashboard, and once a domain is connected the surface that consumes the grant is the API reference. The pricing page covers the platform layer the grant sits on top of.