Skip to content

working example with the oauthd docker container with Windows 7.1

TheVinc edited this page Nov 26, 2014 · 1 revision

Made by kalanbates.

Environment Variable Tested with docker container running inside Windows boot2docker vm.

In the interests of documenting a full working example with the oauthd docker container:


╔════════════════════════════════════════════════════════════╗ Note that boot2docker requires hardware virtualization to be enabled. My laptop (Haswell i5 4200 U) shipped with VT-x disabled by default. I had to Boot to the BIOS | Advanced | Hardware Configuration | "Enable Intel Virtualization Technology" before boot2docker would run. ╚════════════════════════════════════════════════════════════╝


Procedure I used to get this running (starting from a working installation of boot2docker in Windows 7.1)

There are 4 components that I used to make this work: 1)the docker containers 2)the facebook app 3)the host registry 4)the provider registration

(The docker containers) | Inside boot2docker

docker@boot2docker:~$ docker run -d --name redis -p 6379:6379 dockerfile/redis
docker@boot2docker:~$docker run -p 443:443 -p 6284:6284 -e oauthd_host_url=http://auth.domain:6284 -d --link redis:redis vinc/oauthd-instance
docker@boot2docker:~$ ip addr #<= (this is intended as a comment, btw) Confirm private IP applied

(The facebook app) | inside facebook

Apps | Add a new App | Website | <insert name> | Skip and Create App ID
Settings | Basic | + Add Platform | Website | Site URL = http://auth.domain:6284
Settings | Basic | App Domains = "auth.domain"
Settings | Advanced | Valid OAuth redirect URIs = "http://auth.domain:6284/auth"
[Save Changes]
[Keep browser open] or note "App Id" and "App Secret" for provider registry

(The host registry) | inside C:\Windows\system32\drivers\etc\hosts

192.168.59.103   auth.domain

(The provider registry) | inside oauthd portal

Home | Apps | +Create a new app | > View app's page
Apps :: "App" | Domains | http://auth.domain:6284
Apps :: "App" | + Add a provider | "Facebook"
Apps :: "App" :: facebook | client_secret = facebook."App Secret"
Apps :: "App" :: facebook | client_id = facebook."App Id"
Apps :: "App" :: facebook | Save changes
Apps :: "App" | Providers::facebook | "Try auth"

image