Testing OAuth2 with Facebook ConnectPublished 2015-2-2
A lot of people don't know this, but local web development gets a lot easier when you have a few dummy domains to work with.
file:// urls all have limitations that
you'll run into sooner or later.
For that reason (and for you testing pleasure),
I maintain a number of
(one for pretty much every domain I own)
and I also have a few
dummy facebook apps so that I can test other people's examples
(and create zero-config examples).
It's also beneficial to be able to test cross-domain, cross-security, and cross-app interactions. For that I provide 2 examples using HTTPS (one with real certificates) and 1 with HTTP.
For SSL see https://github.com/coolaj86/nodejs-ssl-example.
For OAuth2 with Facebook see https://github.com/LDSorg/passport-lds-connect-example.
If you're creating your own example, feel free to test with these real, live, working dummy keys:
You can edit
/etc/hosts on your local computer as well as on your server
so that you can test with my dummy keys even when you're don't want to run
# Host Database
# localhost is used to configure the loopback interface
# when the system is booting. Do not change this entry.
TODO: I've got a sneaky dns service on my todo list that might make this process even simpler (personalized dyndns). Remind me if I haven't posted back about it in a few months. One of my current projects requires it, so it's gonna get done.
OAuth2 (Facebook Connect)
Dummy API Keys
Because sometimes you just want crap to work without any work on your part.
https on 4443 - local.helloworld3000.com
http on 4080 - local.foobar3000.com
https on 8043 - local.ldsconnect.org
Actual SSL certificates for local.ldsconnect.org:
For some webservers you are required to concatonate all of the
*.crt.pem files into a single
others require them separate.
By AJ ONeal
Did I make your day?
Buy me a coffee