javascriptoauth-2.0windows-live

Windows Live JavaScript SDK authentication/login (OAuth) handling trouble


I'm currently looking at the Microsoft Live JavaScript SDK (OneDrive mostly) and I'm having some problems with the OAuth login process. I am using the examples found on MSDN pages to log-in/authenticate but there is something weird going on.

Whenever I do WS.init() my page refreshes... and when I call the same function again I get the popup window I expected. I click to accept, but the popup does not close and instead load the page which I came from.

I normally would expect no redirect here at all and the popup window should just close normally leaving me on the page from which I came.

I have ensured that my redirect URI (account.live.com application settings) is the exact same as the hostname I am developing this thing on. I faced a similar problem with dropbox.js's OAuth process, but that was simply solved by adding a OAuth reciever page. So I get the feeling that I'm missing something here. Anyone else familiar with how this works ? I'm having trouble finding any info on this.


Solution

  • After some more digging I finally found my answer. Turns out Windows Live SDK has the same solution as dropbox.js (which I mentioned in my question).