Linking an extra authentication method? #838
Replies: 1 comment
-
Ahoy @theo-rapidfire ! Let's try and untangle this login flow. Let's start with the "Account Portal" login. That first section of code you shared is correct. Call This should either return
Now that we've got that base line, let's look at the Apple Sign In scenario. Looking to the samples again, Does the above all make sense? If it helps spot the problem already, good! Otherwise, can continue digging together. |
Beta Was this translation helpful? Give feedback.
-
I've completed the basic Epic Online Services integration for a mobile game (Android & iOS) and am in the process of streamlining a few flows & improving the overall experience.
We currently use the account portal for logging in:
EOSManager.Instance.StartLoginWithLoginTypeAndToken(LoginCredentialType.AccountPortal, null, null, info => ... )
Then do a Connect login:
EOSManager.Instance.StartConnectLoginWithEpicAccount(epicAccountId, connectLoginCallbackInfo => ... )
If the account doesn't exist, show a "create?" prompt, if yes:
EOSManager.Instance.CreateConnectUserWithContinuanceToken(connectLoginCallbackInfo.ContinuanceToken, createUserCallbackInfo => ... )
And then a final Connect login with the new account:
EOSManager.Instance.StartConnectLoginWithEpicAccount(epicAccountId, connectLoginCallbackInfo => ... )
In order to link accounts I've made this flow:
This logic appears to work, but I'm not sure this is the intended flow at all, or if there's a better approach. In general I have found very little information on how to link accounts.
However, when adding Apple Sign In, this approach unfortunately fails.
I have a setup where I can successfully sign in with Apple, but I don't get a LocalUserId after logging in. In that case, the
auth.GetLoginStatus
call will report the user as being logged out.Changing it to use the EOSConnect interface alleviates this issue, but then I'm unsure how I go about getting an access token.
I've also found a
LinkAccount
method in the Auth & Connect interfaces, which sounds more like what I need, but I don't know when in the flow I need to handle this, as well as what error scenarios to tackle,At this point I somehow also created diverging accounts as well, so if I sign in using the Account Portal using Apple, I will get a different account than when I use the Sign In With Apple plugin...
Beta Was this translation helpful? Give feedback.
All reactions