Skip to content

Instantly share code, notes, and snippets.

How to get facebook login working with Meteor and Cordova on iOS

Step 1: Make your local dev site internet accessible

Because there is an issue with OAuth2 login and localhost development, you currently have to deploy your meteor site to be able to test the Facebook login. A nice little workaround for this is to make the local instance of meteor accessible externally.

There is a great online guide for setting up port forwarding with your router and you can check your public external IP here.

For example, If you have an Apple router, simply open up Airport Utility on your Mac and click edit on your router, then go to the Network tab. Under Port Settings click the + icon and select Personal Web Sharing, setting all of the public and private ports to 3000. Make sure the private IP is set to your current computer IP.

@phund
phund / gist:23b8e60092f2f729e0f3911234faf9cf
Last active August 30, 2016 07:41
Ionic fix bug: collection-repeat tried to compute the height of repeated elements "{item} in {items}", but was unable to. Please provide the "item-height" attribute
When use ionic with cache and collection repeat => catch unexpected errors
reference: https://forum.ionicframework.com/t/please-help-test-angular-1-3-improved-transitions-cached-views-etc/12528/160
[nav-view="cached"] {
display: initial;
visibility: hidden;
}
@phund
phund / gist:e8f4ec616acf6f3a18021d8b0cb21b73
Last active June 19, 2017 20:38
Deploy meteor app to heroku
1. Install heroku
reference: https://toolbelt.heroku.com
wget -O- https://toolbelt.heroku.com/install-ubuntu.sh | sh
2. create a heroku app
heroku login
heroku apps:create foobar
3. Set a Meteor buildpack for your Heroku instance
reference: https://elements.heroku.com/search/buildpacks?q=meteor
@phund
phund / gist:b0e31f1fd180a0ccd8b49838d8004fc1
Created May 15, 2016 01:22
Update branch name in local and remote
git branch -m old_branch new_branch # Rename branch locally
git push origin :old_branch # Delete the old branch
git push --set-upstream origin new_branch # Push the new branch, set local branch to track the new remote
@phund
phund / gist:5daca82379d38ddad201
Created February 19, 2016 02:53 — forked from weberste/gist:354a3f0a9ea58e0ea0de
Dates only with Angular-UI Bootstrap datepicker
app.directive('datepickerLocaldate', ['$parse', function ($parse) {
var directive = {
restrict: 'A',
require: ['ngModel'],
link: link
};
return directive;
function link(scope, element, attr, ctrls) {
var ngModelController = ctrls[0];