Search code examples
windows-phone-7openidaccountmanager

AccountManager on Windows Phone 7


Is there an AccountManager on Wp7 similiar to the one in Android? So I can use the phone's already authenticated Google account as openID or something (login to my service without asking for his password).

EDIT to add: I have an Active Directory of users, I know their email addresses. (Including their live id if needed, would have preferred Gmail though) I want to be able to login a user without asking for any password, based on authenticated accounts available on his phone.


Solution

  • You can use Live ID.

    In manifest:

    <Capabilities>
          ...
          <Capability Name="ID_CAP_IDENTITY_DEVICE"/>
          <Capability Name="ID_CAP_IDENTITY_USER"/>
       < /Capabilities>
    
    
    using Microsoft.Phone.Info;
    
    string anid = UserExtendedProperties.GetValue("ANID") as string;
    string anonymousUserId = anid.Substring(2, 32);
    

    Details here.

    So you can get a combination of Live Id and Device id to identify the user+device.