Has anyone had some success implementing OpenID on Windows Phone 7 using PhoneGap?
Another post suggests to use ChildBrowser (Using OpenID on a PhoneGap platform). But when I look at the ChildBrowser plugin for Windows Phone 7 (GitHub link) it seems to be in really bad shape.
Edit: There seem to be no issues with ChildBrowser, I just downloaded the files in the wrong way. But I'm still interested in learning to implement OpenID in this setup.
I am able to solve it in the following way:
1) When User clicks Google, Facebook, Twitter etc, I open a link (http://www.mywebsite.com/login/google) in InAppBrowser (PhoneGap native function, no plugin required).
2) When the link is opened, my server redirects to Google.com and user sees Google login page.
3) User authenticates itself with Google and Google redirects with the token to my server.
4) Now my server uses that token to create some accounts, logs, do some more operations and then redirects to a url with information required by my phone application.
E.g. - It redircts to http://mywebsite.com/login/google/successful?token=<>&query-string-parameters
5) InAppBrowser is listening for URL changes and when it finds a URL with the above pattern, it takes over, strips the URL, parses the information sent with the URL and then closes InAppBrowser.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With