Repository navigation
Description
π Enhancement description
Cloudflare
Via Cloudflare Zero Trust β SaaS application β Generic OIDC. Standard OIDC: /authorization, /token, /userinfo endpoints, scopes openid email profile, returns sub/email/name.
endpoints are per-tenant + per-client (https://{team}.cloudflareaccess.com/cdn-cgi/access/sso/oidc/{clientId}/...), not global. The OAuth2 base class only has slots for appId + appSecret, so we'll store the team name inside appSecret as a JSON blob ({"clientSecret":"...","team":"..."}) β same pattern Microsoft uses for tenantID.
Resend β needs two calls
Via Resend OAuth 2.1 + PKCE . Endpoints: /oauth/authorize, /oauth/token, /oauth/revoke, plus /oauth/register for Dynamic Client Registration.
π€ Pitch
Two things need your sign-off:
1: No /userinfo β decode the JWT instead?
Resend has no /userinfo endpoint and no id_token. The only place user identity lives is inside the access_token JWT (typ: at+jwt, RFC 9068, signed ES256). To get the user ID we'd base64-decode the JWT payload and read sub β without verifying the signature.
RFC 9068 says clients shouldn't inspect access tokens. We're ok with it because:
- Token arrives over TLS from
api.resend.com/oauth/tokendirectly - We never use it for downstream calls β just read
subfor identity - Existing providers (Kick) already do JWT inspection
This part is kind of necessary for resend.
Another Question:
Resend supports public (token_endpoint_auth_method: "none", PKCE only) and confidential (client_secret_basic or client_secret_post) clients. We want confidential so we can reuse the standard verifyCredentials() pattern from the HuggingFace PR #13123 (Basic auth header + invalid code β invalid_client means bad creds, invalid_grant means good creds).
Confirm?
You can confirm the findings from these ref:
- Feat 13067 huggingface oauth providerΒ #13123 (HuggingFace, merged): Feat 13067 huggingface oauth providerΒ #13123
- feat(account): make email optional for OAuth2 account linkingΒ #13255 (email optional, merged): feat(account): make email optional for OAuth2 account linkingΒ #13255
- Cloudflare SaaS OIDC docs: https://developers.cloudflare.com/cloudflare-one/access-controls/applications/http-apps/saas-apps/generic-oidc-saas/
- Resend OAuth changelog: https://resend.com/changelog/oauth-support
π Have you spent some time to check if this issue has been raised before?
- I checked and didn't find similar issue
π’ Have you read the Code of Conduct?
- I have read the Code of Conduct
Activity
imtia33 commentedon Aug 25, 2026
Ignore Q1