{"id":18159,"library":"better-auth-steam","title":"Better Auth Steam Plugin","description":"Steam OpenID 2.0 plugin for Better Auth, providing Steam login via two endpoints: GET /api/auth/steam/login and GET /api/auth/steam/callback. It adds a nullable unique steamId field on the user model and requires better-auth >= 1.4.0 and zod >= 4 as peer dependencies. Version 0.1.1 ships TypeScript types. Key differentiators: full Steam OpenID assertion validation using check_authentication, synthetic email generation for users without email, and customizable profile mapping.","status":"active","version":"0.1.1","language":"javascript","source_language":"en","source_url":null,"tags":["javascript","better-auth","steam","openid","authentication","typescript"],"install":[{"cmd":"npm install better-auth-steam","lang":"bash","label":"npm"},{"cmd":"yarn add better-auth-steam","lang":"bash","label":"yarn"},{"cmd":"pnpm add better-auth-steam","lang":"bash","label":"pnpm"}],"dependencies":[{"reason":"peer dependency: plugin integration requires Better Auth >= 1.4.0","package":"better-auth","optional":false},{"reason":"peer dependency: used for runtime schema validation (zod >= 4)","package":"zod","optional":false}],"imports":[{"note":"ESM-only import. CommonJS require() will fail.","wrong":"const steamOpenID = require('better-auth-steam')","symbol":"steamOpenID","correct":"import { steamOpenID } from 'better-auth-steam'"},{"note":"Client plugin is exported from the /client subpath, not the main entry.","wrong":"import { steamOpenIDClient } from 'better-auth-steam'","symbol":"steamOpenIDClient","correct":"import { steamOpenIDClient } from 'better-auth-steam/client'"},{"note":"Type-only import. Options interface is not a runtime value.","wrong":"import { SteamPluginOptions } from 'better-auth-steam'","symbol":"SteamPluginOptions","correct":"import type { SteamPluginOptions } from 'better-auth-steam'"}],"quickstart":{"code":"import { betterAuth } from 'better-auth/minimal';\nimport { steamOpenID } from 'better-auth-steam';\n\nexport const auth = betterAuth({\n  plugins: [\n    steamOpenID({\n      apiKey: process.env.STEAM_API_KEY ?? ''\n    })\n  ]\n});","lang":"typescript","description":"Server-side setup: imports Better Auth minimal client and steamOpenID plugin, configures with a Steam API key from environment variable."},"warnings":[{"fix":"Ensure STEAM_API_KEY is set in production and development environments. Validate with zod or a runtime check.","message":"Missing or empty STEAM_API_KEY environment variable will cause runtime errors during Steam profile fetch.","severity":"gotcha","affected_versions":">=0.1.0"},{"fix":"If you need a custom callback URL, consider forking the plugin or using a reverse proxy.","message":"Since version 0.1.0, the plugin does not support custom callback base URL configuration. Redirects are bound to the current origin.","severity":"deprecated","affected_versions":">=0.1.0"},{"fix":"Upgrade Better Auth to version 1.4.0 or later.","message":"The plugin requires Better Auth >= 1.4.0. Using an older version will cause import or runtime errors.","severity":"breaking","affected_versions":"<1.4.0"},{"fix":"Override the syntheticEmailDomain option to a domain you control, or handle synthetic emails in your email verification flow.","message":"The synthetic email domain defaults to 'steam.local' which may conflict with local development email setups.","severity":"gotcha","affected_versions":">=0.1.0"}],"env_vars":null,"last_verified":"2026-04-25T00:00:00.000Z","next_check":"2026-07-24T00:00:00.000Z","problems":[{"fix":"Run 'pnpm add better-auth-steam' (or npm install / yarn add).","cause":"Package not installed via pnpm/npm/yarn.","error":"Cannot find module 'better-auth-steam'"},{"fix":"Set the STEAM_API_KEY environment variable in your .env file or shell.","cause":"Missing or undefined STEAM_API_KEY environment variable.","error":"TypeError: Cannot destructure property 'apiKey' of 'undefined' or 'null'"},{"fix":"Install zod >= 4: 'pnpm add zod@^4'","cause":"Incompatible zod version installed.","error":"Error: better-auth requires zod >= 4. Found zod 3.x.x."}],"ecosystem":"npm","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}