Forgot password
- Request a reset email.
- Open the link within 20 minutes.
- Submit the token + a new password.
- Replace the password hash and cancel all sessions.
Four everyday situations: creating an account, logging in, staying logged in, and ending access.
Email + a provisional password. A display name is optional.
Save the user and a provisional password hash. Queue an encrypted verification email. Login is still blocked.
Follow the link to the verification page. The link lasts 1 hour.
The email owner submits the link token and a chosen password. ComfyAuth replaces the signup password, verifies the email, and cancels existing sessions and action links together.
An unverified account cannot log in. Signup gives the same general response for an existing email, so it does not directly announce who already has an account. Choosing the final password after opening the email means someone who signed up using your address cannot keep a password they chose for you.
Save the encrypted email with the signup.
Read a ready message, decrypt it, and try SMTP delivery.
Yes: remove the queued message. No: schedule a retry.
On Vercel, an accepted email request attempts up to two messages for that project before replying. Failed attempts back off, up to ten attempts. A message can occasionally be sent twice; its link is still single-use.
Hobby limitation: Vercel runs daily cleanup, not a once-a-minute mail worker. Reliable retries when there is no traffic need an external scheduler. That scheduler is not configured yet.
Your app sends the submitted credentials to the login API.
Does the password match? Is the email verified? Is the account enabled?
If all checks pass, create a random session token. With renewable login, also give the app a private renewal token.
If any check fails, return a general login error. Password and account checks are repeated under a database lock where needed, so a concurrent reset cannot leave a valid login with the old password.
For browser apps, keep the ComfyAuth token on your server. Your own page uses your app’s secure cookie. Native apps use secure OS storage.
The portal keeps access and renewal tokens in Secure, HttpOnly cookies. Its JavaScript cannot read them. No token is placed in local storage.
Your backend calls GET /v1/me with the project ID
and session token.
Correct project? Not expired? Not revoked? User still active?
Valid: return the user’s ID and profile. Invalid: reject the request.
Your application then checks its own permissions. Ordinary login
keeps the original 24-hour pass. Add renewable: true
at login to let your app replace short-lived passes automatically.
Usually after 15 minutes. Your app sends its current private renewal token to POST /v1/auth/refresh.
Check the account, time limits and whether this renewal token was already used. Replace both tokens together.
Your app saves the new pair and retries the rejected identity check once. The session ID stays the same.
The old pair stops working. Only one renewal can run at a time. Reusing a spent renewal token cancels that device’s session, so a lost response means signing in again.
A short pass lasts 15 minutes. Seven days without renewal means sign in again. Thirty days from the original login is the maximum, even if the app is used every day.
Access: 5–60 minutes. Inactivity: 1–90 days. Total lifetime: 1–365 days. Inactivity cannot exceed total lifetime. Shorter settings affect later renewals; longer settings never extend an existing login’s original maximum.
The developer portal handles renewal through protected cookies and coordinates browser tabs. Browsers without Web Locks or working browser storage require login again after access expires. Only a nonsecret pending marker uses browser storage; credentials stay in protected cookies. Native apps and customer backends use the same JSON endpoint and secure token storage. Logout and password recovery still cancel the session and its renewal tokens.
Passwords use salted Argon2id hashes. Session, API, and email-action tokens are saved as hashes, not reusable raw secrets.
The email queue uses AES-256-GCM because the worker must read the message to send it. Production web and database traffic use encrypted connections.
Email addresses and usernames remain readable to the application and database administrators. This is not end-to-end encryption. Storage encryption and backups also need infrastructure controls. The service has not had an independent security audit.