Hello,
In our game we give users the option not to use an Epic Account. If they change their minds we offer the option to upgrade to an Epic Account later.
However, there is an issue with a particular scenario:
1. User chooses not to use an Epic Account so we create an EOS account using EOS_Connect_CreateUser using their platform account credentials
2. The user later decides to upgrade their account to an Epic Account. They return to the login screen and select Epic Account this time
3. We call EOS_Auth_Login to log them into their Epic Account.
4. Then we call EOS_Connect_Login using their Epic Account credentials. Since this is the first time they are using their Epic Account we expect this to return EOS_InvalidUser.
5. If InvalidUser is returned we then call EOS_Connect_Login using the user’s platform account credentials.
6. If that returns EOS_Success then we know this user previously played this game using a non Epic Account, but is now signing in using an Epic Account so we give them the option to link the two together.
7. If the player decides to link them then we call EOS_Connect_LinkAccount, passing in the Epic Account credentials.
This seemed to work as expected, however there is a case where this fails.
If the player has logged in to a different product of ours using an Epic Account, then step 4 returns EOS_Success, even if this is the first time that player has played this particular game.
This means that we don’t get to offer them the chance to link their account to an existing one they have on this game, so they will end up with two different EOS accounts.
Firstly, is this expected behaviour? I’d have expected EOS_Connect_Login to fail if we have not called EOS_Connect_CreateUser or EOS_Connect_LinkAccount for a given Epic Account on this game.
If it is expected then what would be the recommended login flow to get around this problem?
Many thanks,
James