---
title: "Sign in with Polpo Mail: single sign-on for your apps · Polpo Mail"
description: "Add a Sign in with Polpo Mail button to your intranet, portal or internal tools: standard OpenID Connect with verified business email addresses, PKCE and no access to mail. Free on every plan."
url: https://polpomail.com/sign-in-with-polpo
last_updated: 2026-11-26
---

Sign in with Polpo Mail

# Let people sign in to your app with their work email

Add a "Sign in with Polpo Mail" button to your intranet, customer portal or internal tools. People use the account they already have, you get a verified name and email address, and nobody has to manage another password. Standard OpenID Connect, free on every plan.

[Register an app](https://polpomail.com/admin/apps) [Read the integration guide](https://polpomail.com/sign-in-with-polpo#guide)

Sign in with Polpo Mail Sign in with Polpo Mail

![Registered sign-in apps in the admin console, with client IDs, discovery URL and sign-in counts](https://polpomail.com/static/shots/sign-in-apps.webp?v=f952ab57eaaa)

Register your intranet, wiki or portal in the admin console and copy the client ID into any OpenID Connect library.

How it works

## Three steps to single sign-on

1. 1

   ### Register your app

   A domain administrator adds the app in Admin › Sign-in apps, with the addresses people return to after signing in, and gets a client ID and secret.
2. 2

   ### Add the button

   Point any OpenID Connect library at Polpo Mail. It finds every endpoint and key from one discovery URL.
3. 3

   ### Get a verified identity

   People approve your app once. Your app receives a signed ID token with a stable user ID, their name and their email address.

Features

## Sign-in you can trust

Built on the same standards as Google and Microsoft sign-in, with mailbox access left out on purpose.

### Standard OpenID Connect

Works with Auth.js, Passport, Authlib, Spring Security, go-oidc, Keycloak brokering and any certified OIDC client.

### No access to mail

Apps learn who someone is, nothing more. They can't read, send or delete mail; that still needs a personal access token.

### Verified business addresses

Every address is a real mailbox on a domain whose owner proved control of it, so `email_verified` is always true.

### Secure by default

PKCE is required for every app, redirect addresses must match exactly, and the sign-in screen can't be embedded by other sites.

### Choose who gets in

Keep an internal tool to people at your domain, or open an app to anyone with a Polpo Mail account.

### People stay in control

Two-step verification and passkeys protect every sign-in. People see the apps they approved and remove them at any time.

Integration guide

## Connect your app in minutes

Most libraries only need the issuer URL, your client ID and secret, and the scopes.

### Endpoints

**Issuer**

`https://polpomail.com`

**Discovery**

`https://polpomail.com/.well-known/openid-configuration`

**Authorize**

`https://polpomail.com/oauth/authorize`

**Token**

`https://polpomail.com/oauth/token`

**Userinfo**

`https://polpomail.com/oauth/userinfo`

**Keys (JWKS)**

`https://polpomail.com/oauth/jwks.json`

**Revocation**

`https://polpomail.com/oauth/revoke`

### Scopes and claims

**`openid`**

Required. `sub`: a stable, opaque user ID that never changes, even if the address is renamed

**`email`**

`email` and `email_verified` (always `true`)

**`profile`**

`name`, and `picture` when the person has a public profile picture

Supported: the authorization code flow with PKCE (S256), `client_secret_basic`, `client_secret_post` or no secret for public apps, RS256 ID tokens, `prompt=none`, `prompt=consent`, `prompt=select_account` and `login_hint` (an email address).

### Node.js with Auth.js (NextAuth)

```
// auth.ts
import NextAuth from "next-auth"

export const { handlers, auth, signIn, signOut } = NextAuth({
  providers: [{
    id: "polpo",
    name: "Polpo Mail",
    type: "oidc",
    issuer: "https://polpomail.com",
    clientId: process.env.POLPO_CLIENT_ID,         // pmc_…
    clientSecret: process.env.POLPO_CLIENT_SECRET, // pms_…
    authorization: { params: { scope: "openid email profile" } },
    checks: ["pkce", "state", "nonce"],
  }],
})
// Redirect URI to register: https://your-app.example.com/api/auth/callback/polpo
```

### Python with Authlib (Flask)

```
from authlib.integrations.flask_client import OAuth

oauth = OAuth(app)
oauth.register(
    name="polpo",
    server_metadata_url="https://polpomail.com/.well-known/openid-configuration",
    client_id=os.environ["POLPO_CLIENT_ID"],
    client_secret=os.environ["POLPO_CLIENT_SECRET"],
    client_kwargs={"scope": "openid email profile", "code_challenge_method": "S256"},
)

@app.route("/login")
def login():
    return oauth.polpo.authorize_redirect(url_for("callback", _external=True))

@app.route("/auth/callback")
def callback():
    token = oauth.polpo.authorize_access_token()  # checks the ID token for you
    user = token["userinfo"]                       # {"sub": "…", "email": "…", "name": "…"}
    session["user"] = {"id": user["sub"], "email": user["email"], "name": user.get("name")}
    return redirect("/")
```

### Go with go-oidc

```
provider, _ := oidc.NewProvider(ctx, "https://polpomail.com")
conf := oauth2.Config{
    ClientID: os.Getenv("POLPO_CLIENT_ID"), ClientSecret: os.Getenv("POLPO_CLIENT_SECRET"),
    Endpoint: provider.Endpoint(), RedirectURL: "https://your-app.example.com/auth/callback",
    Scopes: []string{oidc.ScopeOpenID, "email", "profile"},
}
verifier := oauth2.GenerateVerifier() // keep it, with state and nonce, in the user's session
url := conf.AuthCodeURL(state, oidc.Nonce(nonce), oauth2.S256ChallengeOption(verifier))

// In the callback, after checking state:
tok, _ := conf.Exchange(ctx, r.URL.Query().Get("code"), oauth2.VerifierOption(verifier))
idToken, _ := provider.Verifier(&oidc.Config{ClientID: conf.ClientID}).Verify(ctx, tok.Extra("id_token").(string))
var claims struct{ Sub, Email, Name string; Nonce string }
idToken.Claims(&claims) // compare claims.Nonce with the one you sent
```

### Without a library

Send the browser to the authorize endpoint:

```
GET https://polpomail.com/oauth/authorize
    ?response_type=code
    &client_id=pmc_…
    &redirect_uri=https://your-app.example.com/auth/callback
    &scope=openid%20email%20profile
    &state=RANDOM_STATE
    &nonce=RANDOM_NONCE
    &code_challenge=BASE64URL(SHA256(code_verifier))
    &code_challenge_method=S256
```

The person signs in if needed and approves your app once. They come back to your redirect URI with `?code=…&state=…&iss=https://polpomail.com`. Check `state`, then swap the code (valid for 2 minutes, once) from your server:

```
curl https://polpomail.com/oauth/token \
  -u "pmc_…:pms_…" \
  -d grant_type=authorization_code \
  -d code=CODE_FROM_THE_REDIRECT \
  -d redirect_uri=https://your-app.example.com/auth/callback \
  -d code_verifier=YOUR_CODE_VERIFIER

{
  "access_token": "poa_…",
  "token_type": "Bearer",
  "expires_in": 3600,
  "id_token": "eyJhbGciOiJSUzI1NiIs…",
  "scope": "openid email profile"
}
```

The ID token is a JWT signed with RS256. Its payload looks like this:

```
{
  "iss": "https://polpomail.com",
  "sub": "3f9c1e0a7b5d4c2e8f61a0b9c7d5e3f1",
  "aud": "pmc_…",
  "azp": "pmc_…",
  "iat": 1795000000,
  "exp": 1795003600,
  "nonce": "RANDOM_NONCE",
  "email": "ann@yourcompany.com",
  "email_verified": true,
  "name": "Ann Example"
}
```

The access token works only with `GET /oauth/userinfo` (`Authorization: Bearer poa_…`), which returns the same user claims. It doesn't work with the REST API, IMAP, SMTP or MCP.

### Checklist

- Check the ID token's signature against the JWKS, and that `iss` is `https://polpomail.com`, `aud` is your client ID, `exp` is in the future and `nonce` is the one you sent. Libraries do this for you.
- Identify people by `sub`, not by email address: addresses can be renamed, `sub` stays the same.
- Keep the client secret on your server. Apps that run in the browser or on a phone are registered as public apps and use PKCE without a secret.
- Redirect URIs must start with `https://`. For development, `http://localhost` and `http://127.0.0.1` work on any port.
- Keep your own session after sign-in. To check that someone is still signed in to Polpo Mail, repeat the request with `prompt=none`: you get a code, or `error=login_required` or `consent_required` without any screen. Send `login_hint` with the email address you got the first time: people can be signed in to several accounts, and without it you may get `account_selection_required`.
- When several accounts are signed in on the browser, people choose which one to use. To skip that step for an account you already know, send its email address as `login_hint`. To let people switch accounts (a "Switch account" button), send `prompt=select_account`, which shows the choice even with one account.

FAQ

## Questions about sign-in

**Does it cost extra?**

No. Sign in with Polpo Mail is included on every plan, with up to 20 apps per domain.

**Can an app read my email?**

No. Apps get your name, email address and profile picture, and only after you approve them. Reading, sending or organising mail needs a personal access token that you create yourself in Settings › Access tokens.

**Who can register an app?**

Only administrators of a domain on Polpo Mail, in Admin › Sign-in apps. Each app shows people which domain registered it, so they know who they're dealing with.

**Can people from other companies sign in to my app?**

You choose for each app. "Only people at your domain" suits intranets and internal tools; "Anyone with a Polpo Mail account" suits customer portals and apps for partners.

**How do people remove an app?**

In Settings › Connected apps. The app's access tokens stop working right away, and it asks for permission again the next time they sign in. Administrators can turn an app off or delete it for everyone.

**Are refresh tokens supported?**

Not yet. Access tokens last an hour and are meant for reading the profile once at sign-in; keep your own session after that. Refresh tokens, and access to mail for apps people choose to allow, are planned.

**Does it work with two-step verification and passkeys?**

Yes. People sign in to Polpo Mail exactly as usual, with their second step or passkey, before approving your app. If they're already signed in, it takes one click.

## Give your team one sign-in for everything.

Business email on your own domain, with single sign-on for your own apps, free for up to 10 mailboxes.

[Create your free workspace](https://polpomail.com/signup)
