[PR #4877] feat: Steam social provider (v2) #5632

Open
opened 2026-03-13 12:29:57 -05:00 by GiteaMirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/better-auth/better-auth/pull/4877
Author: @ping-maxwell
Created: 9/24/2025
Status: 🔄 Open

Base: canaryHead: feat/oauth/steam-v2


📝 Commits (10+)

  • 2f2aa8e feat: Steam social provider (v2)
  • ff75d31 chore: lint
  • d3f696e Merge branch 'canary' into feat/oauth/steam-v2
  • 7cacc87 Merge branch 'canary' into feat/oauth/steam-v2
  • bdd0719 Merge branch 'canary' into feat/oauth/steam-v2
  • 3cb5fc2 Merge branch 'canary' into feat/oauth/steam-v2
  • 0a5cfd4 Merge branch 'canary' into feat/oauth/steam-v2
  • ee17872 Merge branch 'canary' into feat/oauth/steam-v2
  • 2368ce4 Merge branch 'canary' into feat/oauth/steam-v2
  • fc4f66e Merge branch 'canary' into feat/oauth/steam-v2

📊 Changes

6 files changed (+865 additions, -0 deletions)

View changed files

📝 docs/components/sidebar-content.tsx (+17 -0)
docs/content/docs/authentication/steam.mdx (+188 -0)
📝 packages/better-auth/src/client/plugins/index.ts (+1 -0)
📝 packages/better-auth/src/plugins/index.ts (+1 -0)
packages/better-auth/src/plugins/steam/client.ts (+12 -0)
packages/better-auth/src/plugins/steam/index.ts (+646 -0)

📄 Description

Better-Auth does not currently support Steam as a provider because Steam authentication does not comply with OAuth or OIDC standards. For example, it does not respect state, does not require a client ID, client secret, or application registration with redirect whitelisting, and lacks an OIDC endpoint—instead, you must use your own API key to call ISteamUser/GetPlayerSummaries/v002/ after receiving the callback. Additionally, Steam does not return an email address, as user information is only accessible via a public profile endpoint. Due to these incompatibilities, integrating Steam with a spec-compliant adapter is not feasible, so a custom plugin is required.

Big thanks to the initial implementation from https://gist.github.com/Whats-A-MattR/5bce5574e568e8d8e6be55cf692df3a1 while a lot of the logic is re-written, this was a good head start for me!

Status: ready

  • docs

Summary by cubic

Added a Steam social provider via a custom plugin using Steam OpenID and Web API. Supports sign-in and account linking, with docs and client exports.

  • New Features

    • Endpoints: POST /sign-in/steam and GET /steam/callback.
    • Account linking: POST /link-social/steam (requires session).
    • Plugin options: steamApiKey, mapProfileToUser, disableImplicitSignUp, accountLinking.
    • Client/server exports wired; new docs page and sidebar item.
  • Migration

    • Set STEAM_API_KEY in env.
    • Add steam() to your auth plugins.
    • Pass the user’s email to signIn.steam (Steam doesn’t return email).
    • Add your app origin(s) to trustedOrigins for redirects.

Written for commit b8c6ab56a5. Summary will update automatically on new commits.


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/better-auth/better-auth/pull/4877 **Author:** [@ping-maxwell](https://github.com/ping-maxwell) **Created:** 9/24/2025 **Status:** 🔄 Open **Base:** `canary` ← **Head:** `feat/oauth/steam-v2` --- ### 📝 Commits (10+) - [`2f2aa8e`](https://github.com/better-auth/better-auth/commit/2f2aa8e3941c348d6dedf870d47b68e5fee57198) feat: Steam social provider (v2) - [`ff75d31`](https://github.com/better-auth/better-auth/commit/ff75d31a8b9d5f81d9ecee524d45b72099f2a5ef) chore: lint - [`d3f696e`](https://github.com/better-auth/better-auth/commit/d3f696e152b12c30e214587b136e6f4633a826c7) Merge branch 'canary' into feat/oauth/steam-v2 - [`7cacc87`](https://github.com/better-auth/better-auth/commit/7cacc876d4625a3d79583976961b3140364f55f3) Merge branch 'canary' into feat/oauth/steam-v2 - [`bdd0719`](https://github.com/better-auth/better-auth/commit/bdd0719bfa2413056f7b0e3ce1865e81d03241bc) Merge branch 'canary' into feat/oauth/steam-v2 - [`3cb5fc2`](https://github.com/better-auth/better-auth/commit/3cb5fc2915cd3ffa25e2b3dae01a727b1309d6f2) Merge branch 'canary' into feat/oauth/steam-v2 - [`0a5cfd4`](https://github.com/better-auth/better-auth/commit/0a5cfd464f1e3991cc3744626f00febd55f7042a) Merge branch 'canary' into feat/oauth/steam-v2 - [`ee17872`](https://github.com/better-auth/better-auth/commit/ee17872836d0afbe9d419898a5e91aec31772e4e) Merge branch 'canary' into feat/oauth/steam-v2 - [`2368ce4`](https://github.com/better-auth/better-auth/commit/2368ce4043974ac897344304b55448516e5a4c33) Merge branch 'canary' into feat/oauth/steam-v2 - [`fc4f66e`](https://github.com/better-auth/better-auth/commit/fc4f66e6064333defa1511158fbeb7110977b973) Merge branch 'canary' into feat/oauth/steam-v2 ### 📊 Changes **6 files changed** (+865 additions, -0 deletions) <details> <summary>View changed files</summary> 📝 `docs/components/sidebar-content.tsx` (+17 -0) ➕ `docs/content/docs/authentication/steam.mdx` (+188 -0) 📝 `packages/better-auth/src/client/plugins/index.ts` (+1 -0) 📝 `packages/better-auth/src/plugins/index.ts` (+1 -0) ➕ `packages/better-auth/src/plugins/steam/client.ts` (+12 -0) ➕ `packages/better-auth/src/plugins/steam/index.ts` (+646 -0) </details> ### 📄 Description Better-Auth does not currently support Steam as a provider because Steam authentication does not comply with OAuth or OIDC standards. For example, it does not respect state, does not require a client ID, client secret, or application registration with redirect whitelisting, and lacks an OIDC endpoint—instead, you must use your own API key to call ISteamUser/GetPlayerSummaries/v002/ after receiving the callback. Additionally, Steam does not return an email address, as user information is only accessible via a public profile endpoint. Due to these incompatibilities, integrating Steam with a spec-compliant adapter is not feasible, so a custom plugin is required. Big thanks to the initial implementation from https://gist.github.com/Whats-A-MattR/5bce5574e568e8d8e6be55cf692df3a1 while a lot of the logic is re-written, this was a good head start for me! ## Status: ready - [x] docs <!-- This is an auto-generated description by cubic. --> --- ## Summary by cubic Added a Steam social provider via a custom plugin using Steam OpenID and Web API. Supports sign-in and account linking, with docs and client exports. - **New Features** - Endpoints: POST /sign-in/steam and GET /steam/callback. - Account linking: POST /link-social/steam (requires session). - Plugin options: steamApiKey, mapProfileToUser, disableImplicitSignUp, accountLinking. - Client/server exports wired; new docs page and sidebar item. - **Migration** - Set STEAM_API_KEY in env. - Add steam() to your auth plugins. - Pass the user’s email to signIn.steam (Steam doesn’t return email). - Add your app origin(s) to trustedOrigins for redirects. <sup>Written for commit b8c6ab56a59c63bf40749853ca03e266221aae05. Summary will update automatically on new commits.</sup> <!-- End of auto-generated description by cubic. --> --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
GiteaMirror added the pull-request label 2026-03-13 12:29:57 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/better-auth#5632