DEPRECATED - Migrated to https://github.com/mozilla/fxa
Перейти к файлу
John Morrison 220fb1a0af chore(teamcity): use fxdownload version that downloads from moz cdn 2015-11-15 22:40:03 -08:00
app fix(client): update Firefox for iOS marketing snippet 2015-11-12 14:22:04 -05:00
docs feat(docs): Document WebChannel communication with the browser. 2015-11-04 12:58:56 +00:00
grunttasks refactor(client): Convert `app` to the Simplified CommonJS wrapper. 2015-11-09 11:44:20 +00:00
locale chore(l10n): Extract the train 50 strings. 2015-11-12 22:33:01 +00:00
scripts fix(config): copy 'local.json-dist' to 'local.json' if it don't exists 2015-09-29 00:47:14 +01:00
server fix(csp): Fix the default-profile.svg CSP error. Code cleanup. 2015-11-13 13:17:22 +00:00
tests chore(teamcity): use fxdownload version that downloads from moz cdn 2015-11-15 22:40:03 -08:00
.awsbox.json add static directory configuration param and fix awsbox config 2013-12-10 15:08:32 -08:00
.bowerrc chore(build): disable bower analytics 2015-07-06 17:46:05 -07:00
.editorconfig feat(oauth): suggest account to use during sign up if possible 2015-04-28 16:59:10 -04:00
.eslintignore chore(lint): switch from JSHint to ESLint 2015-06-12 14:06:52 -07:00
.eslintrc feat(build): Object literals must be sorted alphabetically. 2015-09-28 12:00:58 +01:00
.gitattributes Generated basic Yeoman project. 2013-12-04 11:55:48 -08:00
.gitignore feat(verification): organize verification experiments 2015-09-08 11:38:26 -04:00
.htmllintrc chore(htmllint): add htmllint to repo 2015-07-13 16:36:54 -07:00
.jscsrc fix(lint): disallow const keyword 2015-08-27 15:36:52 -07:00
.travis.yml fix(tests): add a way to disable client metrics stderr 2015-11-12 11:41:12 -05:00
AUTHORS Release v0.47.0 2015-10-06 15:30:35 -04:00
CHANGELOG.md Release v0.49.3 2015-11-06 11:59:39 -05:00
CONTRIBUTING.md chore(docs): Update the commit body guidelines to include the issue number 2015-07-28 13:19:17 -07:00
Dockerfile feat(docker): Dockerfile and README update for basic docker development workflow 2015-02-17 22:16:13 -05:00
Gruntfile.js chore(build): Include license header at the top of minified main.js 2015-07-01 10:04:26 -07:00
LICENSE Add MPL 2.0 license file. 2014-08-18 14:47:36 -07:00
README.md chore(lint): remove jshint 2015-06-24 13:34:44 -07:00
bower.json fix(checkbox): make custom checkbox label clickable 2015-10-05 15:20:31 -04:00
npm-shrinkwrap.json fix(build): adjust shrinkwrap due to a failing SHA 2015-11-04 18:12:09 -05:00
package.json Release v0.49.3 2015-11-06 11:59:39 -05:00

README.md

Firefox Accounts Content Server

Build Status: Travis Coverage Status

Static server that hosts Firefox Account sign up, sign in, email verification, etc. flows.

Follow the instructions on: fxa-local-dev

The above link helps to install the following pre-requisites, and set up a development environment.

Prerequisites

  • node 0.10.x
  • npm
  • Grunt
  • libgmp
  • fxa-local-dev - Please note that this is the preferred way of contributing to Firefox Accounts.

Development Setup

Make sure that fxa-local-dev servers are running. The fxa-content-server will listen on http://127.0.0.1:3030 by default.

Note: If you have issues with npm install please update to npm 2.0+ using npm install -g npm@2 (Issue #1594)

Docker Based Development

To run the content server via Docker, three steps are required:

$ docker build --rm -t mozilla/fxa_content_server .
$ docker run --rm -v $PWD:/opt/fxa mozilla/fxa_content_server npm install
$ docker run -it --rm -v $PWD:/opt/fxa --net=host mozilla/fxa_content_server

This method shares the codebase into the running container so that you can install npm and various modules required by package.json. It then runs FxA content server in a container, while allowing you to use your IDE of choice from your normal desktop environment to develop code.

Be sure to copy server/config/local.json-dist to server/config/local.json per usual before the final docker invocation to run the service.

Note to boot2docker users: you must edit your server/config/local.json to use the correct IP of your boot2docker VM. Check with the command: boot2docker ip

Then replace the public_url IP address in local.json that reads: "public_url": "http://127.0.0.1:3030" with the IP that you noted above. It should be something like 192.168.59.103.

To stop the container, first try CTRL+C. If that does not work, run docker ps |grep fxa_content_server to get the hexadecimal Container ID (the first column of output). Run docker stop nnnnnnnnnnnn where the nnnn part is the Container ID.

Testing

Prerequisites:

Setup

  • Run Selenium Server

e.g. in shell form:

java -jar selenium-server-standalone-2.46.0.jar 

To run tests locally with Selenium:

npm test

To change the default auth server edit server/config/*.json on your deployed instance.

{
  "fxaccount_url": "http://your.auth.server.here.org"
}

Note that testing with Selenium via Docker does not work at present, so all testing must be carried out via your normal operating system's npm & Java tooling.

Grunt Commands

Grunt is used to run common tasks to build, test, and run local servers.

TASK DESCRIPTION
grunt build build production resources. See task source for more documentation
grunt clean remove any built production resources.
grunt lint run ESLint, JSONLint, and JSCS (code style checker) on client side and testing JavaScript.
grunt server run a local server running on port 3030 with development resources.
grunt server:dist run a local server running on port 3030 with production resources. Production resources will be built as part of the task.
grunt test run local Intern tests.
grunt version stamp a new minor version. Updates the version number and creates a new CHANGELOG.md.
grunt version:patch stamp a new patch version. Updates the version number and creates a new CHANGELOG.md.

Servers

License

MPL 2.0