to continue to your central Wmail identity
"Sign in with Wmail" uses a standard OAuth 2.0 authorization-code flow — the same shape as "Sign in with Google" or an Entra ID (Azure AD) app registration. Nothing about a user's identity is ever sent to your redirect URL until Wmail has verified, server-side, that the URL belongs to your registered application.
In the Developer Panel, click Register Application and give it a name plus one or
more exact redirect URIs — the page on your site that Wmail is allowed to send
users back to (e.g. https://myapp.com/auth/wmail/callback).
You'll get a client_id (public, safe to put in frontend code) and a
client_secret (private — keep it on your server only, shown once).
Wmail will refuse to redirect anywhere that isn't on this exact list, so double- and triple-check
it before saving.
Redirect the browser to the login page with your client_id,
the exact redirect_uri you registered, and a random
state value (store it, e.g. in a cookie, so you can check it
matches on the way back — this stops cross-site request forgery on your callback).
The user logs into their Wmail identity as usual, then sees a consent screen naming your app and
exactly what it will receive (name + email). Only after they click Allow does
Wmail redirect back to your redirect_uri with a short-lived,
single-use code and your state
value attached as query parameters.
On your callback route, first check that state matches what
you stored in step 2. Then call the token endpoint from your backend (never from
the browser — this is the one call that needs your client_secret):
code is single-use and expires after 2 minutes — always exchange it immediately in your callback handler.state parameter on your callback before trusting the response.