1

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.

TDaver
  • 7,164
  • 5
  • 47
  • 94

1 Answers1

1

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.

Community
  • 1
  • 1
Anton Sizikov
  • 9,105
  • 1
  • 28
  • 39
  • yeah but I can't use this for authentication... :( – TDaver Sep 21 '12 at 08:45
  • Why not? Let him to create an account and connect it whith live id. Then instead of asking a password check the live id. – Anton Sizikov Sep 21 '12 at 08:52
  • but I dunno the live id. I only know a GUID unique to his live id! – TDaver Sep 21 '12 at 09:09
  • Yes, that's right. But I can't see the difference. If you don't need to send e-mails, why not to store the GUID instead of e-mail? If you need an e-mail - ask user to input it. – Anton Sizikov Sep 21 '12 at 09:12
  • 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. – TDaver Sep 21 '12 at 09:32
  • Unfortunately, GUID is the only info, you can get without asking user to input it manualy. – Anton Sizikov Sep 21 '12 at 11:00