To map your old MMO game accounts from your own authentication server to Steam accounts as you ship to Steam, you'll need to implement a strategy that ensures users can securely link their existing game accounts with their new Steam credentials. Here’s a step-by-step process you can follow:
1.
Integrate Steamworks SDK First, make sure you integrate Steam's authentication system using the
Steamworks SDK. This SDK provides tools for user authentication and can verify that a user is logged into Steam.
- Use Steam’s
SteamID as the unique identifier for a Steam account.
- This is the ID you'll be linking to your existing accounts.
2.
Create an Account Linking Flow You will need a process for players to link their existing accounts to their Steam accounts. This can be handled in several ways:
#### A.
In-Game Account Linking 1.
Login to Steam: When the user launches the game via Steam, you can retrieve their SteamID.
2.
Prompt for Existing Account Details: If this is their first time linking, prompt the user to log into their existing account using your old authentication system (either in-game or through a web portal).
3.
Link Accounts: Once the user successfully logs into their old account, store their SteamID alongside their existing account information on your server.
4.
Success Notification: Notify the user that their Steam account has been successfully linked to their old game account.
#### B.
External Web Portal for Linking 1.
Steam Login via OpenID: Create a web portal where players can log in using their Steam account via
Steam OpenID.
2.
Prompt for Existing Account: After logging in with Steam, prompt the user to log into their old account.
3.
Link Accounts: Once both Steam and old account credentials are verified, save the SteamID and link it with the old account.
3.
Backend Changes You’ll need to update your backend to handle both SteamIDs and your existing account identifiers. This can be done by:
-
Adding a SteamID field to your user database.
- When linking accounts, store the user’s SteamID in this new field.
- When a player logs in via Steam, first check if their SteamID is already linked to an account. If yes, authenticate them using their SteamID instead of your old credentials.
4.
Handle Existing Players For existing players, you’ll need to:
-
Auto-link accounts for players who register via Steam: When a player logs in via Steam, and their SteamID isn't linked yet, prompt them to log in to their old account so that you can map the SteamID.
-
Offer incentives (optional): To encourage existing players to link their accounts, you could offer in-game rewards or bonuses for completing the linking process.
5.
Migration Considerations -
Single Account Mapping: Ensure that a single old account can only be mapped to one SteamID to avoid account sharing issues.
-
Account Duplication: Prevent users from creating multiple Steam accounts and linking them to the same in-game account unless intended.
-
Data Transfer: Ensure that all important data (progress, items, purchases) from the old account is correctly accessible after linking to Steam.
6.
Provide Support for Account Issues - Implement a support process in case users have trouble linking their accounts. For example, if they forget their old credentials, provide password recovery options.
7.
Test Thoroughly Before going live with this system, extensively test both the authentication and account linking processes to ensure there are no issues with data integrity or user authentication.
Example Flow:
1. User launches the game via Steam.
2. The game fetches the user’s SteamID via the Steamworks SDK.
3. If no account is linked, prompt the user to log in with their old account credentials.
4. On successful login, link the SteamID with the old account in your database.
5. Future logins via Steam auto-authenticate based on the linked SteamID.
By following these steps, you should be able to seamlessly map old accounts to Steam ones while maintaining player progress and security.