Steam uses OpenID 2.0 rather than OAuth 2.0. Magic handles the protocol difference for you — the SDK surface is the same as the other social providers.
Usage
Prerequisites
- You will need a Steam account
- You will need a Steam Web API key
- You will need to have the Magic SDK installed into your web app
- You will need to have the Magic SDK - OAuth Extension installed into your web app (
@magic-ext/oauth2v15.6.0 or higher is required for Steam support)
Steam Setup
After installing the OAuth extension, you can now enable Steam Login for your Magic app:- Sign in at steamcommunity.com/dev/apikey and register a Steam Web API key
- Go to your Magic Dashboard
- Select the Magic app for which you’d like to enable Steam Login, or create a new app
- Navigate to Authentication > Social Login from the sidebar
- Click the toggle for Steam
- Input the Web API Key for your Steam app and save
-
Go to Settings > Allowed Origins & Redirects and add the Redirect URI you are passing as the
redirectURIargument to the redirect allowlist:JavaScript - In Magic Dashboard, click Save
Steam does not require a per-app client registration on their side. The only configuration Steam needs is the Web API key. Redirect URI validation happens on Magic’s side via the app’s redirect allowlist.
Implementation
Trigger the login flow:JavaScript
JavaScript
getRedirectResult automatically detects Steam’s OpenID 2.0 response parameters and routes them through the Steam verification flow — no separate method call is needed.
The result interface:
Profile fields beyond
steamId (persona name, avatar, etc.) are fetched from Steam’s GetPlayerSummaries API. If Steam is unreachable or the Web API key is invalid, these fields will be null for first-time logins. For returning users, Magic preserves the last-known profile data.