A minimal identity bridge for Gmail.
Running is simple:
git clone https://github.com/mozilla/persona-gmail-bridge.git
cd persona-gmail-bridge
npm install
npm start
For local development, set the SHIMMED_PRIMARIES
environment variable for gmail.com and googlemail.com before you start up Persona:
cd /path/to/persona
export SHIMMED_PRIMARIES='gmail.com|http://127.0.0.1:3000|/path/to/persona-gmail-bridge/var/well-known.json,googlemail.com|http://127.0.0.1:3000|/path/to/persona-gmail-bridge/var/well-known.json'
npm start
You're done!
Visit http://127.0.0.1:10001/ and try signing in with your Gmail account!
npm test
You're done!
For information on what parameters can be configured, please review lib/config.js.
You can set values via individual environment variables, or you can set CONFIG_FILES
to point to JSON files containing settings.
To pass multiple files, concatenate their paths with commas.
Example:
CONFIG_FILES='/app/foo.json,/app/bar.json' npm start
Local testing shouldn't require changing any settings.
Production deployments must change:
server.publicUrl
andserver.personaUrl
cert.pubKeyPath
andcert.privKeyPath
session.secret
Production deployments may want to change:
server.port
andserver.host
logPath
proxy.host
andproxy.port
statsd.enabled
,statsd.host
, andstatsd.port
If enabled, the bridge can report statistics via statsd:
authentication.forwarding.success
authentication.forwarding.failure.bad_input
authentication.forwarding.failure.openid_error
authentication.openid.success
authentication.openid.failure.bad_result
authentication.openid.failure.cancelled
authentication.openid.failure.mismatch
authentication.openid.failure.no_claim
certification.success
certification.failure.no_proof
certification.failure.invalid_pubkey
certification.failure.signing_error
response_code.{code} -- on every response
routes.{path}.{method} -- on every request