Skip to content

jperl/meteor-phonegap-oauth

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

33 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

meteor-phonegap-oauth

Meteor's OAuth flow currently only works with popups. PhoneGap does not handle this very well. Using the InAppBrowser plugin we can load the OAuth popup into this child browser.

The patch basically listens for the pagestop event and analyzes the uri to determine what action to take (if any). This includes manually closing the InAppBrowser to satisfy Meteor's checks.

This has been tested with Meteor 0.8.2, accounts-linkedin, Cordova 3.5 and the Meteor-Rider hijacking method.

note you need to use at least Cordova 3.5 and Meteor 0.8.2

Setup

Installation

  • Add OAuth Meteor package of your choice (i'm using LinkedIn)
  • mrt add phonegap-oauth
  • Click the log in with [Twitter/LinkedIn/etc...]
  • Enter email/password and click authorize
  • Meteor should now be logged in

See this repo for a working example

Special thanks to Zoltan for the inspiration on this from Meteor-Talk!

Contributors

About

Fixes how Meteor handles OAuth popups on PhoneGap/fullscreen

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • JavaScript 100.0%