I was looking at Facebook authentication some more and noticed that the Unity SDK guide says to use credentials.IdentityProvider.Logins.Add ("graph.facebook.com", "facebook_token");, but the AWS Cognito sample uses credentials.AddLogin(authProvider, accessToken);.
Additionally, there is no mention of needing to call credentials.GetCredentialsAsync(serviceCallback, null) in the Unity SDK guide, although the sample code does so. I was attempting to use credentials.IdentityProvider.RefreshAsync(), but this didn't seem to trigger the identity to update/merge post-Facebook linking. This standalone example doesn't seem to be a complete one as I can't determine where it's actually adding the Facebook login to the IdentityProvider, although it does use RefreshAsync() when the FB login succeeds.
Personally, these inconsistencies have made it difficult to track down issues at times. I know the SDK for Unity is still in Developer Preview status, but I hope that updating and unifying documentation and code samples will be made a priority soon. Thanks!
I was looking at Facebook authentication some more and noticed that the Unity SDK guide says to use
credentials.IdentityProvider.Logins.Add ("graph.facebook.com", "facebook_token");
, but the AWS Cognito sample usescredentials.AddLogin(authProvider, accessToken);
. Additionally, there is no mention of needing to callcredentials.GetCredentialsAsync(serviceCallback, null)
in the Unity SDK guide, although the sample code does so. I was attempting to usecredentials.IdentityProvider.RefreshAsync()
, but this didn't seem to trigger the identity to update/merge post-Facebook linking. This standalone example doesn't seem to be a complete one as I can't determine where it's actually adding the Facebook login to the IdentityProvider, although it does useRefreshAsync()
when the FB login succeeds.Personally, these inconsistencies have made it difficult to track down issues at times. I know the SDK for Unity is still in Developer Preview status, but I hope that updating and unifying documentation and code samples will be made a priority soon. Thanks!