OAuth for Windows 8 apps

alexbrodiealexbrodie Registered Users Posts: 6 Beginner grinner
I am having trouble with Smugmug oauth in a Windows 8 app.

It appears that Oauth 1 is still the preferred approach based on this: https://smugmug.atlassian.net/wiki/display/API/OAuth. I've tried that approach, but I think I'm running into the same unresolved issue as this person: http://www.dgrin.com/showthread.php?t=228761&highlight=oauth. Everything seems to work fine (I get to the WebAuthenticationBroker::AuthenticateAsync call, the auth works, my app is shown as confirmed with the "Authorization Complete" page) up until the final redirect when I get a non-continuable error page:

Can't connect to service
We can't connect to the service you need right now. Check your network connection or try this again later.

This same code works fine to oauth with Flickr where registering the oauth_callback param is supported.

I've also been trying to see if there are oath v2 with smugmug as this person has seemed to pull off: http://suntsu.ch/serendipity/index.php?/categories/13-MySmug. However there appears to be no documentation on oauth 2 for smugmug. I do have oauth 2 working with Facebook in my app and it is much simpler and less error prone than oauth 1 with Flickr, so I feel this would be the preferred solution.

Any advice out there on the preferred mechanisms for authenticating a Windows 8 app with Smugmug?

Thanks in advance

Comments

  • alexbrodiealexbrodie Registered Users Posts: 6 Beginner grinner
    edited April 9, 2013
    Anyone?
  • devbobodevbobo Registered Users, Retired Mod Posts: 4,339 SmugMug Employee
    edited April 10, 2013
    Hey Alex,

    Sorry, I missed this post somehow.

    We don't currently support OAuth v2.0...it's still in draft and Eran Hammer removed his name off the paper last year, which says a lot about OAuth 2.0. I haven't looked at the spec in detail for some time, I should probably read over it again.

    Either that guy hasn't written his blog post very clearly or you have read something into his words that he hadn't intended.

    Cheers,

    David
    David Parry
    SmugMug API Developer
    My Photos
  • alexbrodiealexbrodie Registered Users Posts: 6 Beginner grinner
    edited April 13, 2013
    Thanks for the reply. I don't think I was reading something unintended in "The preferred method to authenticate to SmugMug is OAuth V2.0." However, that wasn't really the primary question, just one possible answer to the question.

    Is there a way to authenticate Smugmug with Windows 8 Apps? Given that V2 is off the table, is there a way to achieve this with V1? It seems like the lack of oauth_callback is making this difficult.

    Thanks.
  • alexbrodiealexbrodie Registered Users Posts: 6 Beginner grinner
    edited April 14, 2013
    Ah. It should have been obvious, but you must set the callback URL in smugmug under Account > Discovery > API Keys > Callback URL to something. Then use that value rather than WebAuthenticationBroker::GetCurrentApplicationCallbackUri when getting the request token, and specify it when calling WebAuthenticationBroker::AuthenticateAsync.
Sign In or Register to comment.