0

After Authorization, How can I confirm the Yahoo! ID

So, I got Yahoo/OAuth/Delicious working a few days ago. But I just noticed that my app doesn't get any confirmation of the Yahoo! ID which has been authorized.

You see, I send the user to Yahoo! in their web browser, they enter they Yahoo! ID, authorize linking to my app, and then I get a callback which has a token and a verifier, and it works. But I don't know what Yahoo! ID they entered. My app can store credentials for multiple accounts on various services. So I need an account name to put in, for example, a popup menu.

I realize I could ask the user which Yahoo! ID they just authorized, but that is redundant and introduces the possibility of human error.

There must be a way to get the Yahoo! ID associated with an authorization?!?

Thank you,

Jerry Krinock

by
8 Replies
  • QUOTE (Jerry @ Mar 23 2010, 03:02 PM) <{POST_SNAPBACK}>
    So, I got Yahoo/OAuth/Delicious working a few days ago. But I just noticed that my app doesn't get any confirmation of the Yahoo! ID which has been authorized.

    You see, I send the user to Yahoo! in their web browser, they enter they Yahoo! ID, authorize linking to my app, and then I get a callback which has a token and a verifier, and it works. But I don't know what Yahoo! ID they entered. My app can store credentials for multiple accounts on various services. So I need an account name to put in, for example, a popup menu.

    I realize I could ask the user which Yahoo! ID they just authorized, but that is redundant and introduces the possibility of human error.

    There must be a way to get the Yahoo! ID associated with an authorization?!?

    Thank you,

    Jerry Krinock
    0
  • Sorry, I just added a reply and quoted myself with no new text. Wasn't thinking while clicking buttons.

    Anyhow, what I wanted to say is that there is a further complication to this. When I linked my Delicious and Yahoo! accounts, I was apparently given the opportunity to give it a Delicious account name. So now, I have can have three ways to refer to one Yahoo!-linked Delicious account:

    1. The Yahoo! ID
    2. The username that I gave when I linked the new Delicious account to Yahoo!
    3. Whatever name I gave it when I linked it to my app and got authorization.


    This may cause confusion for some users. Is there some way to keep the user from getting confused?
    0
  • Hi Jerry,

    The recommended way is to use OpenID with OAuth as documented
    in the Yahoo! OpenID + OAuth Quick Start Guide:
    http://developer.yahoo.com/oauth/guide/ope...auth-guide.html

    With that, users can sign into your web site with their Yahoo!
    OpenID and you can use that to identify these users. Because
    we support the OpenID Attribute Exchange (AX) extension, you can
    also request for user's name, email address, profile pic, gender,
    timezone, and language preference during the sign-in flow. You can
    check this post for details:

    http://developer.yahoo.net/forum/index.php?showtopic=3696


    I hope this helps.

    Thanks,
    Yu Wang
    Yahoo! Membership
    0
  • QUOTE (omiga @ Mar 23 2010, 08:21 PM) <{POST_SNAPBACK}>
    The recommended way is to use OpenID with OAuth as documented in the Yahoo! OpenID + OAuth Quick Start Guide: http://developer.yahoo.com/oauth/guide/ope...auth-guide.html
    Thank you, Yu. Here I was, so happy that I had implemented OAuth and this job was almost done. But, Oh my God. I've just spent an hour reading OpenID and Yadis documentation, and now it appears that OAuth was only half the challenge!

    QUOTE (omiga @ Mar 23 2010, 08:21 PM) <{POST_SNAPBACK}>
    With that, users can sign into your web site with their Yahoo! OpenID
    That part that bothers me. All this OpenID and Yadis stuff seems to presume that I have a website. But my app is a locally installed aka "desktop", Macintosh application. No one is logging into my site. Does this answer still apply to my app?

    QUOTE (omiga @ Mar 23 2010, 08:21 PM) <{POST_SNAPBACK}>
    and you can use that to identify these users. Because we support the OpenID Attribute Exchange (AX) extension, you can also request for user's name, email address, profile pic, gender, timezone, and language preference during the sign-in flow...
    Nah. Not interested in any of that. All I want is their Yahoo! ID.

    Are you sure that I can use OpenID for a locally installed aka "desktop" application? If so, tell me what is the URL to which I would send my request to do "discovery". That seems to be the first step.
    0
  • It appears that the problem is solved!

    I just discovered that in some of the Delicious API, for example posts/get, Delicious returns a tag that has a "username" attribute. It's actually the Delicious username, which may or may not be the same as the Yahoo! ID. But it's good enough for me. So all I need do is send a posts/get API request immediately upon getting access for the first time, and run the response through my XML parser.
    0
  • Wooohooo! It works. All done. Took 20 minutes instead of the expected 20 hours!
    0
  • Hi Jerry,

    Good to know that you have your problem solved quickly.

    Since yours is desktop application, OpenID doesn't apply to
    your case.

    However, as long as you register a consumer key that asks for
    access to Yahoo! user's profile, contacts and etc, you can
    still use OAuth to call the Social Directory API to access more
    user information. You can check this document for details:

    http://developer.yahoo.com/social/rest_api...al_dir_api.html

    Thanks,
    Yu Wang
    0
  • hussainrafaqat671@yahoo.com

    0

Recent Posts

in OAuth General Discussion YDN SDKs