Because:
* Our new MJML emails are being pushed to prod and we no longer need the MJML features flags or old templates. While working through these we also realized `verifySecondary` is never sent, and `verifySecondaryCode` is always sent instead.
This commit:
* Removes MJML feature flags
* Combs through `emails.js` and adds all missing tests to `mjml-emails.ts`, deletes `emails.js`, renames `mjml-emails.ts` to `emails.ts`
* Removes verifySecondary template and most logic around it, preferring verifySecondaryCode
* Bumps all email template versions up by 1
* Removes all email templates, but leaves the templates dir and templates/index.js renderer file since SMS still needs it for now
fixes#10032
Because:
* We want these values to be configurable for easy changes on the ops side to investigate recent auth-server performance problems
* We temporarily disabled db calls for oauth clients to see if that was the problem, but it hasn't changed much
This commit:
* Creates SMTP_MAX_MESSAGES and SMTP_MAX_CONNECTIONS env vars with defaults to what we currently have
* Removes the previously commented out line temporarily disabling db calls for oauth clients
Because:
- when a PayPal user's initial payment failed while subscribing to a
product through the "passwordless" flow, we erroneously send a
cancellation email to the user, who hasn't successfully created an
account or subscription yet
This commit:
- skip the email if the subscription is a PayPal based one and the user
isn't verified (has set a password)
This commit:
- Addresses build error in CI
Because:
- The command `yarn workspace fxa-auth-server build` was failing
- Switching to require statements in redis.js file clears typescript error saying the 'default export was not defined'.
Because:
-The admin panel needs access to the actual list of attached clients, and the logic to do this already exists in the auth server.
This commit:
- Introduces fxa-shared/connected-services/factories.ts. Classes therein contain the logic for building and merging attached clients from sessions, devices, and oauthClients.
- Introduces fxa-shared/connected-services/accessors.ts. Classes therein contain the ‘accessors’ layer through which any database (Redis or MySql) interactions flow. Note that these are base classes and are designed to be extended from. Currently the OauthDB class and the OAuthRedisClass in fxa-auth-server are extensions. As more shared functionality is required, code can be hoisted to these base classes to provide shared functionality.
- Introduces fxa-shared/connected-services/formatters. Classes therein manipulate the state of attached clients so that various fields are formatted properly.
- Introduces fxa-shared/util.ts. This is a catch all for auxiliary methods that were generally useful and used in more than one place.
- Introduces fxa-shared/models. This is a catch all for types used by the connected services code. Hopefully this gives it more structure. Note that there are still some places where output format is defined. A follow up item has been added to supply types for all database structures.
- Introduces fxa-shared/auth. This holds a hash implementation that lived in the auth server in place that it can now be used more generally. Note that, all references to this in fxa-auth-server should be updated now.
- Introduces fxa-shared/db/redis.ts which provides a base class for Redis interactions that can be extended and shared across packages. Similarly to fxa-shared/connected-services/accessors.ts this class is designed to be extended from.
- Updates fxa-shared/db/mysql.ts to be more typescript-like. This means that MySqlStoreShared is now a proper class.
- Adds tests in fxa-shared/test/connected-services and get all code coverage into a green status.
- Updates fxa-shared/db/config.ts to include the ability to produce build configs.
- Fixes issue with ‘openHandles’ which was detected by jest in the admin panel. There were two occurrences where open handles, which are basically hanging async operations, existed.
- There was no way to close database connections. As a result, close methods have been added to MySqlStoreShared and RedisStoreShared which make sure underlying connections are terminated. During test tear down these close() calls are now invoked and waited on.
- In the redis implementation, there were lots of Promise.race invocacations, where a redis call was being raced against a timeout. The issue here was that nothing cancelled the setTimeouts, thereby leaving a bunch of hanging tasks. A small abstraction was added so that these timeouts could be cancelled.
- Updates the admin panel account.resolver to incorporate the ‘attached clients’ that are now accessible via fxa-shared/connected-services.
- Updates the admin panel GraphQL model to include support for attache clients.
- Standardize the config in the admin panel and relies on fxa-shared to produce the DB config thereby ensuring it’s consistent.
- Updates tests in the admin panel to ensure the database service is still accessible, and the ‘connected services db’ can be accessed. This required adding more tables to the testAdmin database that gets constructed during testing.
- Added new table declarations to fxa-shared/test/db/models/auth.
- Other small tasks included making sure the source code terms were present in code files, and running TypeScript hero to make sure import statements were organized.
Closes: #11090
* fix(subscriptions): allow zero dollar invoices
Because:
* For invoices where the amount due is less than Stripe minimums, the
subscription is successfully created, however the user is shown an
error message on completion. This applies to both Stripe and PayPal.
This commit:
* Updates the PayPal zero amount invoice logic.
* Updates the Stripe logic not to expect a payment intent.
Closes#11573
Because:
* cardType and lastFour are undefined when the user pays for the entire cost with a coupon
This commit:
* Checks for cardType and lastFour truthiness before displaying them
Because:
* 225.2 didn't have any patches for the content-server
* Some commit hashes are different relative to what's in main, which may have thrown the release script off.
This commit:
* Replace the redundant section, which are commits from 225.1 with a "No changes." section.
Closes # No issue