fxa/packages/123done
dependabot[bot] 9e4071cb5a
chore(deps): bump the npm_and_yarn group with 2 updates
Bumps the npm_and_yarn group with 2 updates: [jose](https://github.com/panva/jose) and [express](https://github.com/expressjs/express).


Updates `jose` from 5.9.3 to 5.9.4
- [Release notes](https://github.com/panva/jose/releases)
- [Changelog](https://github.com/panva/jose/blob/main/CHANGELOG.md)
- [Commits](https://github.com/panva/jose/compare/v5.9.3...v5.9.4)

Updates `express` from 4.21.0 to 4.21.1
- [Release notes](https://github.com/expressjs/express/releases)
- [Changelog](https://github.com/expressjs/express/blob/4.21.1/History.md)
- [Commits](https://github.com/expressjs/express/compare/4.21.0...4.21.1)

---
updated-dependencies:
- dependency-name: jose
  dependency-type: direct:production
  dependency-group: npm_and_yarn
- dependency-name: express
  dependency-type: direct:production
  dependency-group: npm_and_yarn
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-10-11 22:30:36 +00:00
..
ansible refactor(config): replace 127.0.0.1 with localhost 2020-04-15 13:55:42 -07:00
scripts Display a 🔒 icon for users who signed in with 2FA mozilla/123done#165) r=@vladikoff 2018-04-16 16:08:55 -04:00
static feat(react): Implement OAuth functionality for Signin flows 2024-03-12 23:09:23 -07:00
.eslintrc.json chore(lint): Fix 123done ESLint config 2022-07-13 10:39:39 -07:00
.nsprc chore(deps): Updates to address nsp advisory 1179 2020-03-19 10:42:24 -07:00
.prettierignore refactor(packages): use workspace references 2020-05-21 10:57:21 -07:00
Procfile feat(heroku): adds support for heroku and 123done 2021-05-04 16:47:46 -04:00
README.md chore(deps): Specify 123Done client secret from a secrets.json file 2023-11-06 15:50:05 -05:00
backstage.yaml fix(backstage): update db references, add gql API ref 2024-01-26 08:41:53 -08:00
config-local-untrusted.json chore(deps): Specify 123Done client secret from a secrets.json file 2023-11-06 15:50:05 -05:00
config-local.json chore(deps): Specify 123Done client secret from a secrets.json file 2023-11-06 15:50:05 -05:00
config-stage-untrusted.json feat(heroku): adds support for heroku and 123done 2021-05-04 16:47:46 -04:00
config.js chore(deps): Specify 123Done client secret from a secrets.json file 2023-11-06 15:50:05 -05:00
config.json chore(deps): Specify 123Done client secret from a secrets.json file 2023-11-06 15:50:05 -05:00
oauth.js feat: vendor fxa-jwtool 2024-05-06 07:52:16 -07:00
package.json chore(deps): bump the npm_and_yarn group with 2 updates 2024-10-11 22:30:36 +00:00
pm2.config.js chore(deps): upgrade to node.js 18 2023-03-20 13:28:10 -05:00
server.js feat: remove encrypted cookie sessions from 123done 2024-08-20 17:30:32 +00:00
version.js feat(123done): add version route 2020-09-08 11:44:54 -04:00

README.md

A demo of Firefox Accounts OAuth

Running locally

  1. Complete prerequisites for running FxA
  2. Create a secrets.json file in 123done root folder and specify the client_secret value.
  3. Run the server: yarn start
  4. Visit it in your browser: http://localhost:8080/
  5. Hack and reload! (web resources don't require a server restart)

Ansible Deployment

See fxa-dev 123done Ansible configuration for details.

Heroku Deployment

Before you begin

  • This process is to deploy an existing FxA-integrated Heroku application. Separate steps are required to create a new Heroku app integrated with FxA, including updating the client URL redirect values in the FxA OAuth database.
  • Unless your tests require the untrusted 123Done app, you may just need to deploy the 123Done trusted app to stage and prod (i.e. deploy two instead of all four apps).

Instructions

  1. Sign up for Heroku at https://sso.heroku.com/login
  1. Install heroku cli and login
  • heroku login
  1. Ensure access to 123Done apps
  • Search for and have a mozillacorporation member grant access (view, deploy, operate, manage) to following apps:
    • production-123done
    • production-123done-untrusted
    • stage-123done
    • stage-123done-untrusted
  • You'll get an invitation email for each app.
  • Why are there four apps?
    • There is a trusted and an untrusted OAuth RP app for each environment to test trusted and untrusted OAuth flows.
  1. Clone each app on the command line that you need to deploy with the provided instructions in the invitation email.
  • E.g. heroku git:clone -a stage-123done
  • Note: While app config for stage is in the 123Done package in our FxA monorepo, prod config is in environment variables in the Heroku dashboard to avoid exposing the OAuth client secret.
  1. Deploy app
  • In the fxa repo, checkout branch origin/heroku-updates and create and checkout a local branch of the same name.
    • This branch contains different root level package.json commands and/or (dev)dependencies that reduce the size of the Heroku deploy slug. There are limits to the size that can be deployed.
    • The main differences are the install run script and to avoid the check-package-manager.sh script, since the command uses npm instead of yarn.
      • Note: Heroku is compatible with yarn, but at the time of writing, only npm worked correctly.
  • Rebase train-XXX branch
    • git rebase origin/train-XXX
      • XXX is the train for the environment you want to deploy in.
  • Create a remote for your local repository for each app you want to deploy.
    • E.g. heroku git:remote -a stage-123done
  • Deploy
    • git push <heroku remote origin> heroku-updates:main -f
      • Force push is needed here because of the commit with changes to package.json
      • <heroku remote origin> is the git remote linked to the version of the heroku app you're deploying, i.e. stage/production and trusted/untrusted.
      • N.B. There may have been breaking changes to the fxa root package.json since the last 123Done deploy. Confer with the team, but if needed, the root package.json can be modified and the last commit amended. Then retry the command.
  1. Push changes to back to FxA repo
  • git push origin heroku-updates -f

Testing

This package does not currently have a test suite.

Run npm test to lint the code.