Can anyone help shed some light on the implementation of the Live SDK (v5.6) vs what's happening in the Microsoft.AspNet.Identity.Owin.dll ?
The user id returned after successful authentication by the following:
//MVC5 UserController for SSO with Microsoft Account
var result = await AuthenticationManager.GetExternalLoginInfoAsync();
var userId = result.Login.ProviderKey;
...differs from the identity being returned by:
//WebAPI 2 custom AuthFilter (performs HMAC, etc)
var liveAuthClient = new LiveAuthClient(clientKey, secretKey, redirectUrl);
var userId = liveAuthClient.GetUserId(authTokenFromHttpHeader);
In both cases the same ClientId and ClientSecret are being used by the Windows Phone 8 client app, MVC5 WebApp and WebAPI 2.
The id returned by the MVC5 website is 16 characters in length whereas the id extracted from the authentication token is 32 characters.
I thought that maybe the id from the client app is an MD5 hash, however they still don't match if I try to hash it.
Any ideas?