Граф коммитов

102 Коммитов

Автор SHA1 Сообщение Дата
Barry Chen 0a7044153d
chore(deps): use mainline webcrypto-liner
Because:
 - we don't need to use our own fork and branch of webcrypto-liner now
   that it implements hkdf
   - we will continue to polyfill since node's webcrypto module is still
     experimental as of v18

This commit:
 - uses mainline webcrypto-liner
2023-03-06 11:29:07 -06:00
Lauren Zugai 67780a385c
feat(react): Account recovery confirm key functionality (+ CompleteResetPassword refactor)
Because:
* We're converting our views from Backbone to React

This commit:
* Serves the 'account_recovery_confirm_key' page to the React side if the feature flag is on
* Modifies fxa-auth-client recoveryKey.ts so we can get the recovery key ID by itself
* Adds all page functionality to AccountRecoveryConfirmKey, including adding needed methods to the account model, making the calls, and handling errors
* Refactors CompleteResetPassword and redirects if the account has a recovery key, but does not redirect if a user has clicked that they've lost their key on AccountRecoveryConfirmKey
* Creates useLinkStatus hooks to give back parameters and validates link status
* Adds AppLayout around LinkExpired, LinkDamaged, and LinkUsed to simplify return/rendering

Closes FXA-6126
2023-02-28 17:49:52 -06:00
Vijay Budhram c403b85223
feat(react): Add password reset confirm page 2023-02-15 12:12:10 -05:00
dschom ec7763a85e
task(settings): Port relier models from content-server
Because:
- We are migrating content server to react

This Commit:
- Ports relier models
- Adds ability to bind models to generic context via an @bind property decorator
- Adds ability to validate field state via a set of validators that can be specified on the @bind decorator
- Provides implementation to bind a model to url search query string context
- Provides implementation to bind a model to url hash state context
- Provides implementation to bind a model to a storage context
- Adds a creational factory pattern for initializing relier models and their state
- Adds relier factory to app context
- Adds a useRelier hook so that we can easily access relier models in components
2023-02-15 08:42:02 -08:00
dschom faff0b46d6
Revert "chore(deps-dev): bump esbuild from 0.14.2 to 0.16.17"
This reverts commit bb02697326.
2023-01-18 11:47:26 -08:00
Vijay Budhram c017270de6
feat(api): Add gql resolvers for change password 2023-01-14 21:02:00 -05:00
dependabot[bot] bb02697326
chore(deps-dev): bump esbuild from 0.14.2 to 0.16.17
Bumps [esbuild](https://github.com/evanw/esbuild) from 0.14.2 to 0.16.17.
- [Release notes](https://github.com/evanw/esbuild/releases)
- [Changelog](https://github.com/evanw/esbuild/blob/main/CHANGELOG-2021.md)
- [Commits](https://github.com/evanw/esbuild/compare/v0.14.2...v0.16.17)

---
updated-dependencies:
- dependency-name: esbuild
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-01-12 01:21:18 +00:00
dschom a620922422
task(CI): build, unit test, and integration test jobs
Because:
- We wanted to run a few preliminary checks before proceeding to more
  expensive CI jobs. Checks include:
    - Compiling typescript in commonly referenced workspace packages
    - Linting code that has changed
    - Executing Unit Tests for code that has changed
- We wanted to partition test operations into unit tests, and
   integration tests. Unit tests can be run relatively quickly and
   require no additional infrastructure. Integration tests require
   additional infrastructure and generally have longer execution
   times. Now that jobs are blocked from running until preliminary
   checks pass, one of which is unit tests, it is important to draw a
   distinction between these two types of tests.
- We want to avoid unnecessary yarn installs and typescript
  compilations, which are time consuming.
- We want to make sure that test results are published and failing tests
   can be easily viewed in the CI.

This Commit:

- Creates a build-and-validate job in the CI that builds, lints, and
  unit tests code prior to running any other jobs.
- Creates unit-test job in CI config
- Creates integration-test job in CI config
- Removes redundant calls to compile workspace packages. These
  are now built up front, cached, and restored as needed for future
  runs.
- Extends the create-lists script functionality to generate commands
  that can be executed with the parallel command.
- Removes unnecessary yarn install operations. Invoking yarn workspace
   focus results in a yarn install. In the case of running tests this is largely
   unnecessary, because we already do a yarn install in the base-install
   step.
- Make sure test results are exported as junit xml so the CI can report
  back on tests that were failing. This was done for a couple workspace
  packages, but many were lacking the capability. All test:unit and
  test:integration npm scripts now export this data.
- Fixes the following issues encountered along the way:
        - Adds logs to monitor heap usage of jest tests. Some
          jest tests are still using a lot of memory.
        - Moves a few slow / long running tests from unit test to
          integration tests.
        - Ensures that jest.transform for ts-jest is always instructed
           to have the config option isolateModules is set to true. This
           definitely decreases memory overhead and resolves some
           of the OOM errors we were hitting. It was configured in
           some places but not everywhere.
        - Exports test results files for all tests
        - Exports all test artifacts
        - Uses gnu parallel to run tests in parallel. Turns out yarn
          workspaces foreach would give a false positive when an OOM
          was encountered. Fortunately, the parallel command offered an
          acceptable work around, and even offers some nice features
          like the load argument, which allows to control test execution a
          bit more efficiently.
2023-01-10 12:52:01 -08:00
Barry Chen 14f89eedfd
feat(gql): add session mutation to verify OTP codes
Because:
 - gql-api should be able to verify an OTP code

This commit:
 - proxy to the auth-server to verify an OTP code
2022-12-28 11:23:38 -05:00
Vijay Budhram fc5bb05e9f
Merge pull request #14691 from mozilla/FXA-6348-resend-session
feat(gql): resend verify code
2022-12-28 11:18:16 -05:00
Vijay Budhram a57d2a76e4
feat(gql): Add verify email code gql 2022-12-27 12:35:55 -05:00
Barry Chen 86cd58125e
feat(gql): resend verify code
Because:
 - gql-api should be able to handle a resend verify code request

This commit:
 - proxy to auth-server to resend a verify code
2022-12-22 14:18:19 -06:00
dschom 12779b14ee
bug(CI): test-content-server-remote must not have parameters
Because:
- We cannot add parameters to job triggered through circleci's API

This Commit:
- Removes parameters from the `test-content-server-remote` job
2022-12-22 10:15:55 -08:00
Barry Chen 0fb467b718
Merge pull request #14672 from mozilla/FXA-6346-session-reauth
feat(gql): re-auth an existing session
2022-12-21 10:45:44 -06:00
Barry Chen 9f2b6a3a20
feat(gql): add proxy to acct finish setup
Because:
 - we want gql-api to finish setting up a stub account for the user

This commit:
 - proxy an account finish setup request to the auth-server
2022-12-20 14:03:40 -06:00
Barry Chen 97005c3b0b
feat(gql): re-auth an existing session
Because:
 - we want to re-auth an existing session through the gql-api

This commit:
 - proxy a session reauth request through the gql-api to the auth-server
2022-12-20 13:52:26 -06:00
Dan Schomburg 4c14d3e2c2
Merge pull request #14597 from mozilla/FXA-6344
task(ci): Use docker base images to run pipelines
2022-12-19 11:09:42 -08:00
dschom 80a4c66a94
Try targeting mozilla-fxa repos again 2022-12-19 09:35:21 -08:00
dschom acf3c82590
task(ci): Use docker base image
Because:
- We want to speed up pipeline startup.

This Commit:
- Optimizes docker base image builds for the smallest images possible.
- Enables hard links for yarn cache
- Enables global yarn cache
- Avoids needlessly installing playwright browsers.
- Avoids needlessly running yarn install.
- Uses mozilla/fxa-circleci:ci-base-latest image for running test pipelines
- Uses mozilla/fxa-circleci:ci-base-browsers image for running functional tests pipelines
- Creates configurable executors that can be reused across pipelines
- Upgrades to yarn 3.3.0
- Enabled direct check out of PR code to test, which is faster than circle ci’s checkout command.
- Upgrades functional test to X-Large. This was already the case for playwright tests, but is now extended to content server tests too. This decision was made due to running lots of pipelines and realizing flakiness was largely due to CPU or memory hitting 100% for long periods of time.
- Turns off tracing, since it saves a bit of runtime.
2022-12-15 15:48:16 -08:00
Dan Schomburg d6efea1d61
Merge pull request #14628 from mozilla/FXA-6263
task(ci): Tag unit tests
2022-12-15 09:09:35 -08:00
Barry Chen 6b38e0ae38
feat(gql): add acct sign up mutation to gql-api
Because:
 - we want to allow front end clients to sign up a user through the
   gql-api

This commit:
 - add the signUp mutation to the Acccount resolver
2022-12-12 13:19:16 -06:00
dschom 9493dd2655
task(ci): Tag unit tests
Because:
- We want to separate unit tests and integrations tests

This Commit:
- Tags all unit tests, i.e. tests that can run without infrastructure and in a fairly short amount of time, with #unit.
- Adds a test:unit npm command to each package
- Adds a test:integration npm command to each package, and adds '#integration' tags to jest tests since jest has no --invert option like mocha.
2022-12-09 17:26:27 -08:00
Barry Chen 45a3748ba3
feat(gql): add acct sign in thru gql-api
Because:
 - we might want to sign in through the gql-api instead of auth-server

This commit:
 - add a mutation to proxy a sign in request to the auth-server
2022-12-07 10:43:12 -06:00
Barry Chen 2dcd1fa589
Merge pull request #14586 from mozilla/ts-4-point-9
chore(deps): upgrade to TS 4.9
2022-12-02 12:39:10 -06:00
Barry Chen 3c34f69394
chore(deps): upgrade to TS 4.9 2022-12-02 10:33:12 -06:00
Vijay Budhram 1681179837
feat(gql): Add gql resolver for password forgot send code 2022-12-02 10:22:25 -05:00
dependabot[bot] 14aa97ff94
chore(deps): bump node-fetch from 2.6.1 to 2.6.7
Bumps [node-fetch](https://github.com/node-fetch/node-fetch) from 2.6.1 to 2.6.7.
- [Release notes](https://github.com/node-fetch/node-fetch/releases)
- [Commits](https://github.com/node-fetch/node-fetch/compare/v2.6.1...v2.6.7)

---
updated-dependencies:
- dependency-name: node-fetch
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-11-16 20:16:42 +00:00
Ben Bangert 9ab9c4f1d3
chore: upgrade typescript to 4.8.2
Because:

* We want faster compilation and inferencing of TS 4.8.2.

This commit:

* Updates TS to 4.8.2. across the fxa workspace.
2022-08-28 10:01:05 -07:00
dependabot[bot] 960d970119
chore(deps): bump fast-text-encoding from 1.0.3 to 1.0.4
Bumps [fast-text-encoding](https://github.com/samthor/fast-text-encoding) from 1.0.3 to 1.0.4.
- [Release notes](https://github.com/samthor/fast-text-encoding/releases)
- [Commits](https://github.com/samthor/fast-text-encoding/commits)

---
updated-dependencies:
- dependency-name: fast-text-encoding
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-07-19 06:15:52 +00:00
Mill 620a8d2d17
chore(multiple): update mocha wherever used 2022-06-28 09:03:42 -07:00
dependabot[bot] 42d89b3c77
chore(deps): bump abab from 2.0.5 to 2.0.6
Bumps [abab](https://github.com/jsdom/abab) from 2.0.5 to 2.0.6.
- [Release notes](https://github.com/jsdom/abab/releases)
- [Changelog](https://github.com/jsdom/abab/blob/master/CHANGELOG.md)
- [Commits](https://github.com/jsdom/abab/compare/2.0.5...2.0.6)

---
updated-dependencies:
- dependency-name: abab
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-06-14 06:25:16 +00:00
dependabot[bot] 882826e119
chore(deps): bump @peculiar/webcrypto from 1.3.3 to 1.4.0
Bumps [@peculiar/webcrypto](https://github.com/PeculiarVentures/webcrypto) from 1.3.3 to 1.4.0.
- [Release notes](https://github.com/PeculiarVentures/webcrypto/releases)
- [Changelog](https://github.com/PeculiarVentures/webcrypto/blob/master/CHANGELOG.md)
- [Commits](https://github.com/PeculiarVentures/webcrypto/compare/v1.3.3...v1.4.0)

---
updated-dependencies:
- dependency-name: "@peculiar/webcrypto"
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-05-26 06:28:24 +00:00
Lauren Zugai 9192ae82fb
feat(third-party auth): Add UI with /create_password route for passwordless accounts
Because:
* Users should be able to set a password after they've created an account via a third-party oauth login

This commit:
* Adds a new 'create_password' route and page for users without a set password to access instead of "change" password, which displays a new FormPassword component, shared with PageChangePassword
* Adds metrics events to PageCreatePassword: engage, submit, success, fail
* Adds createPassword method + the mutation to the Account model
* Updates the Settings > Security > Password section accordingly
* Redirects users from change_password/create_password routes
* Minor HTML/CSS tweaks - remove superfluous div and empty h2 FlowContainer + ChangePassword header tweak, and ensure disabled buttons don't receive hover treatment
* Updates some Storybook states
2022-05-17 15:15:31 -05:00
Vijay Budhram d693ce671e
feat(password): Add graphql mutation to support creating a new password 2022-05-12 12:59:20 -04:00
dependabot[bot] dc0bd2a03a
chore(deps): bump @peculiar/webcrypto from 1.3.2 to 1.3.3
Bumps [@peculiar/webcrypto](https://github.com/PeculiarVentures/webcrypto) from 1.3.2 to 1.3.3.
- [Release notes](https://github.com/PeculiarVentures/webcrypto/releases)
- [Changelog](https://github.com/PeculiarVentures/webcrypto/blob/master/CHANGELOG.md)
- [Commits](https://github.com/PeculiarVentures/webcrypto/compare/v1.3.2...v1.3.3)

---
updated-dependencies:
- dependency-name: "@peculiar/webcrypto"
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-05-09 22:11:29 +00:00
Vijay Budhram d697f20264
chore(sms): Remove sms code (#12298)
* chore(sms): Remove sms code and sign-in codes

* chore(deps): updated yarn.lock

Co-authored-by: fxa-bananafox[bot] <70546514+fxa-bananafox[bot]@users.noreply.github.com>
2022-04-06 09:40:34 -04:00
dschom 37e57852a8
maintenance(auth,profile,settings,shared): Remove AET
Because:
- We want to remove AET (Account Ecosystem Telemetry) related code.s

This Commit:
- Removes account-ecosystem-telmetry.js module
- Removes functions / endpoints that relied exclusively on that module. Specifically operations surrounding updating and fetching the ecosystem_anon_id
- Removed the ecosystem anon id from data payloads.
- Removes ecosystem_anon_id configuration

Closes: #9127
2022-04-01 15:10:04 -07:00
Vijay Budhram f4d13cf324
feat(auth): Add third party auth metrics (#12221) 2022-03-29 10:31:07 -04:00
Barry Chen 0be901dae5
Merge pull request #12159 from mozilla/dependabot/npm_and_yarn/peculiar/webcrypto-1.3.2
chore(deps): bump @peculiar/webcrypto from 1.2.3 to 1.3.2
2022-03-18 14:13:36 -05:00
Vijay Budhram fa817cb378
feat(apple): Add Sign-in with Apple support (#12148) 2022-03-15 22:42:26 -04:00
dependabot[bot] 5d077255ba
chore(deps): bump @peculiar/webcrypto from 1.2.3 to 1.3.2
Bumps [@peculiar/webcrypto](https://github.com/PeculiarVentures/webcrypto) from 1.2.3 to 1.3.2.
- [Release notes](https://github.com/PeculiarVentures/webcrypto/releases)
- [Changelog](https://github.com/PeculiarVentures/webcrypto/blob/master/CHANGELOG.md)
- [Commits](https://github.com/PeculiarVentures/webcrypto/compare/v1.2.3...v1.3.2)

---
updated-dependencies:
- dependency-name: "@peculiar/webcrypto"
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-03-15 06:13:30 +00:00
Vijay Budhram 69797644f8
feat(google): Add frontend screens for linked accounts 2022-02-14 17:16:27 -05:00
Vijay Budhram 97686e4151
feat(google): Add backend support to disconnect goolge linked account 2022-02-09 15:32:17 -05:00
Vijay Budhram 9fd866c8cf
feat(goog): Add google auth frontend login screens (#11743) 2022-01-30 12:03:14 -05:00
Vijay Budhram 643c12606e
feat(google): Add backend support for google auth (#11499) 2022-01-12 21:14:21 -05:00
Vijay Budhram c1f0a3682a
chore(deps): switch from git to https for deps (#11587)
* chore(deps): switch from git to https for deps

See https://github.blog/2021-09-01-improving-git-protocol-security-github/

* fix(git): Use `https://` instead of `git://` for packages

Co-authored-by: Barry Chen <bchen@mozilla.com>
2022-01-11 12:21:56 -05:00
dschom 03ff9f4761
fix(settings): add confirm recovery code modal
Because:

* When generating new recovery codes, there was no confirmation step, which might make it easy for a user to overlook the fact they should download / record their recovery codes.

This commit:

* Introduces the same dialog, which existed in the initial 2FA flow, that prompted a user for at least one recovery code as a way to validate users had recorded them.
* Introduces back end support for creating and updating recovery codes as a two step process.
* Shifts recovery code generation to cient, relocating lib/random.ts.
* Adds validation for recovery codes being updated
* Exposes recovery code length / count settings to client
* Add section about running playwrite tests to readme

Closes #9530
2021-12-14 10:25:48 -08:00
dependabot[bot] b02bdf11fb
chore(deps-dev): bump esbuild from 0.14.1 to 0.14.2
Bumps [esbuild](https://github.com/evanw/esbuild) from 0.14.1 to 0.14.2.
- [Release notes](https://github.com/evanw/esbuild/releases)
- [Changelog](https://github.com/evanw/esbuild/blob/master/CHANGELOG.md)
- [Commits](https://github.com/evanw/esbuild/compare/v0.14.1...v0.14.2)

---
updated-dependencies:
- dependency-name: esbuild
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2021-12-06 06:32:53 +00:00
dependabot[bot] a66e948413
chore(deps-dev): bump esbuild-register from 3.1.2 to 3.2.0 (#11218)
* chore(deps-dev): bump esbuild-register from 3.1.2 to 3.2.0

Bumps esbuild-register from 3.1.2 to 3.2.0.

---
updated-dependencies:
- dependency-name: esbuild-register
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

* chore(deps): updated yarn.lock

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: fxa-bananafox[bot] <70546514+fxa-bananafox[bot]@users.noreply.github.com>
2021-12-02 10:44:38 -06:00
dependabot[bot] 5ee3451f14
chore(deps): bump @peculiar/webcrypto from 1.2.2 to 1.2.3 (#11204)
* chore(deps): bump @peculiar/webcrypto from 1.2.2 to 1.2.3

Bumps [@peculiar/webcrypto](https://github.com/PeculiarVentures/webcrypto) from 1.2.2 to 1.2.3.
- [Release notes](https://github.com/PeculiarVentures/webcrypto/releases)
- [Commits](https://github.com/PeculiarVentures/webcrypto/compare/v1.2.2...v1.2.3)

---
updated-dependencies:
- dependency-name: "@peculiar/webcrypto"
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

* chore(deps): updated yarn.lock

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: fxa-bananafox[bot] <70546514+fxa-bananafox[bot]@users.noreply.github.com>
2021-12-01 09:32:48 -06:00