2018-06-05 00:02:43 -04:00
|
|
|
const fs = require("fs");
|
2022-02-24 12:10:07 +01:00
|
|
|
const path = require("path");
|
|
|
|
|
|
|
|
|
|
const { AngularWebpackPlugin } = require("@ngtools/webpack");
|
2018-06-04 23:10:41 -04:00
|
|
|
const CopyWebpackPlugin = require("copy-webpack-plugin");
|
2022-02-24 12:10:07 +01:00
|
|
|
const HtmlWebpackInjector = require("html-webpack-injector");
|
|
|
|
|
const HtmlWebpackPlugin = require("html-webpack-plugin");
|
2020-05-08 17:42:28 +02:00
|
|
|
const MiniCssExtractPlugin = require("mini-css-extract-plugin");
|
2019-04-20 20:54:50 -04:00
|
|
|
const TerserPlugin = require("terser-webpack-plugin");
|
2022-02-24 12:10:07 +01:00
|
|
|
const webpack = require("webpack");
|
|
|
|
|
|
2021-05-28 02:46:26 +10:00
|
|
|
const config = require("./config.js");
|
2022-02-24 12:10:07 +01:00
|
|
|
const pjson = require("./package.json");
|
2018-06-04 23:10:41 -04:00
|
|
|
|
2021-05-28 02:46:26 +10:00
|
|
|
const ENV = process.env.ENV == null ? "development" : process.env.ENV;
|
|
|
|
|
const NODE_ENV = process.env.NODE_ENV == null ? "development" : process.env.NODE_ENV;
|
2022-06-28 07:32:17 +10:00
|
|
|
const LOGGING = process.env.LOGGING != "false";
|
2021-04-21 11:29:33 -07:00
|
|
|
|
2021-08-25 14:15:31 -04:00
|
|
|
const envConfig = config.load(ENV);
|
2022-06-28 07:32:17 +10:00
|
|
|
if (LOGGING) {
|
|
|
|
|
config.log(envConfig);
|
|
|
|
|
}
|
2018-06-04 23:10:41 -04:00
|
|
|
|
|
|
|
|
const moduleRules = [
|
2021-12-17 15:57:11 +01:00
|
|
|
{
|
2018-06-04 23:10:41 -04:00
|
|
|
test: /\.(html)$/,
|
|
|
|
|
loader: "html-loader",
|
2021-12-17 15:57:11 +01:00
|
|
|
},
|
|
|
|
|
{
|
2018-07-18 10:32:44 -04:00
|
|
|
test: /.(ttf|otf|eot|svg|woff(2)?)(\?[a-z0-9]+)?$/,
|
2021-09-29 23:06:20 +01:00
|
|
|
exclude: /loading(|-white).svg/,
|
2021-12-09 21:12:53 +00:00
|
|
|
generator: {
|
2023-03-23 17:51:03 -04:00
|
|
|
filename: "fonts/[name].[contenthash][ext]",
|
2018-06-04 23:10:41 -04:00
|
|
|
},
|
2021-12-09 21:12:53 +00:00
|
|
|
type: "asset/resource",
|
2018-07-18 10:32:44 -04:00
|
|
|
},
|
2018-06-05 09:01:40 -04:00
|
|
|
{
|
2022-01-10 12:37:21 +01:00
|
|
|
test: /\.(jpe?g|png|gif|svg|webp|avif)$/i,
|
2022-02-03 10:20:31 -06:00
|
|
|
exclude: /.*(bwi-font)\.svg/,
|
2021-12-09 21:12:53 +00:00
|
|
|
generator: {
|
2022-01-14 13:35:44 +01:00
|
|
|
filename: "images/[name][ext]",
|
2021-04-22 21:29:29 +02:00
|
|
|
},
|
2021-12-09 21:12:53 +00:00
|
|
|
type: "asset/resource",
|
2021-12-17 15:57:11 +01:00
|
|
|
},
|
|
|
|
|
{
|
2018-06-04 23:10:41 -04:00
|
|
|
test: /\.scss$/,
|
2021-12-17 15:57:11 +01:00
|
|
|
use: [
|
|
|
|
|
{
|
2020-05-08 17:42:28 +02:00
|
|
|
loader: MiniCssExtractPlugin.loader,
|
2021-12-17 15:57:11 +01:00
|
|
|
},
|
2020-05-08 17:42:28 +02:00
|
|
|
"css-loader",
|
2025-02-20 12:56:22 -05:00
|
|
|
"resolve-url-loader",
|
|
|
|
|
{
|
|
|
|
|
loader: "sass-loader",
|
|
|
|
|
options: {
|
|
|
|
|
sourceMap: true,
|
|
|
|
|
},
|
|
|
|
|
},
|
2021-12-17 15:57:11 +01:00
|
|
|
],
|
|
|
|
|
},
|
2022-03-08 18:18:03 +01:00
|
|
|
{
|
|
|
|
|
test: /\.css$/,
|
|
|
|
|
use: [
|
|
|
|
|
{
|
|
|
|
|
loader: MiniCssExtractPlugin.loader,
|
|
|
|
|
},
|
|
|
|
|
"css-loader",
|
2025-02-20 12:56:22 -05:00
|
|
|
"resolve-url-loader",
|
|
|
|
|
{
|
|
|
|
|
loader: "postcss-loader",
|
|
|
|
|
options: {
|
|
|
|
|
sourceMap: true,
|
|
|
|
|
},
|
|
|
|
|
},
|
2022-03-08 18:18:03 +01:00
|
|
|
],
|
|
|
|
|
},
|
2021-12-17 15:57:11 +01:00
|
|
|
{
|
2022-07-26 14:48:11 +02:00
|
|
|
test: /\.[cm]?js$/,
|
|
|
|
|
use: [
|
|
|
|
|
{
|
|
|
|
|
loader: "babel-loader",
|
|
|
|
|
options: {
|
2024-05-30 18:42:26 -04:00
|
|
|
configFile: "../../babel.config.json",
|
2025-03-11 18:20:32 +01:00
|
|
|
cacheDirectory: NODE_ENV !== "production",
|
2022-07-26 14:48:11 +02:00
|
|
|
},
|
|
|
|
|
},
|
|
|
|
|
],
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
test: /\.[jt]sx?$/,
|
2021-04-22 21:29:29 +02:00
|
|
|
loader: "@ngtools/webpack",
|
2021-12-17 15:57:11 +01:00
|
|
|
},
|
2023-01-26 15:20:12 +01:00
|
|
|
{
|
2024-10-07 13:20:50 +02:00
|
|
|
test: /argon2(-simd)?\.wasm$/,
|
2023-01-26 15:20:12 +01:00
|
|
|
loader: "base64-loader",
|
|
|
|
|
type: "javascript/auto",
|
|
|
|
|
},
|
2018-06-04 23:10:41 -04:00
|
|
|
];
|
|
|
|
|
|
|
|
|
|
const plugins = [
|
|
|
|
|
new HtmlWebpackPlugin({
|
|
|
|
|
template: "./src/index.html",
|
|
|
|
|
filename: "index.html",
|
2024-07-30 12:25:24 +02:00
|
|
|
chunks: ["theme_head", "app/polyfills", "app/vendor", "app/main", "styles"],
|
2018-06-05 09:01:40 -04:00
|
|
|
}),
|
2021-10-05 20:03:24 +10:00
|
|
|
new HtmlWebpackInjector(),
|
2021-03-16 17:44:31 +01:00
|
|
|
new HtmlWebpackPlugin({
|
|
|
|
|
template: "./src/connectors/webauthn.html",
|
|
|
|
|
filename: "webauthn-connector.html",
|
feat(2FA-UI-Refresh): [Auth/PM-8113] - 2FA Components Consolidation and UI Refresh (#12087)
* PM-8113 - Deprecate TwoFactorComponentRefactor feature flag in favor of UnauthenticatedExtensionUIRefresh flag
* PM-8113 - Rename all existing 2FA components as V1.
* PM-8113 - TwoFactorAuthComp - Add comment explaining that tagged unused import is used a dialog.
* PM-8113 - 2FA Auth Comp - deprecate captcha
* PM-8113 - LoginStrategySvc - add todo for deprecation of captcha response
* PM-8113 - TwoFactorAuth tests - remove captcha
* PM-8113 - TwoFactorAuthComp HTML - remove captcha
* PM-8113 - Web Two Factor Auth - update deps
* PM-8113 - Move all new two-factor-auth components into libs/auth instead of libs/angular/src/auth
* PM-8113 - Add new child-components folder to help differentiate between top level page component and child components
* PM-8113 - Add todo for browser TwoFactorAuthEmailComponent
* PM-8113 - TwoFactorAuth - progress on consolidation
* PM-8113 - TwoFactorAuth - add TODO to ensure I don't miss web on success logic
* PM-8113 - TwoFactorAuth - Deprecate browser implementation of two-factor-auth and move all logic into single component - WIP
* PM-8113 - Bring across 2FA session timeout to new 2FA orchestrator comp
* PM-8113 - Export TwoFactorAuth from libs/auth
* PM-8113 - Fix 2FA Auth Comp tests by adding new service deps.
* PM-8113 - Fix TwoFactorAuthExpiredComp imports + TwoFactorAuthComponent imports on other clients.
* PM-8113 - 2FA Auth Comp - Progress on removing onSuccessfulLogin callback
* PM-8113 - 2FA Auth - update deps to private as inheritance will no longer be used.
* PM-8113 - TwoFactorAuthComp - Refactor init a bit.
* PM-8113 - TwoFactorAuthComp - More naming refactors
* PM-8113 - TwoFactorAuth - (1) more refactoring (2) removed onSuccessfulLoginNavigate (3) after successful login we always loginEmailService.clearValues()
* PM-8113 - TwoFactorAuthComp Tests - clean up tests for removed callbacks.
* PM-8113 - TwoFactorAuthComponent - refactor default success route handling
* PM-8113 - TwoFactorAuthComp - More refactoring
* PM-8113 - TwoFactorAuthComp - more refactors
* PM-8113 - TwoFactorAuth - Remove unused service dep
* PM-8113 - TwoFactorAuthComp - Refactor out unused button action text and move checks for continue button visibility into component
* PM-8113 - TwoFactorAuthComponent - Add type for providerData
* PM-8113 - TwoFactorAuthComponent - Add todo
* PM-8113 - TwoFactorAuthComponent - Add client type
* PM-8113 - TwoFactorAuth - implement browser specific SSO + 2FA logic
* PM-8113 - TwoFactorService Abstraction - refactor to use proper functions + mark methods as abstract properly + add null return to getProviders
* PM-8113 - Refactor 2FA Guard logic out of ngOnInit and into own tested guard. Updated all routes.
* PM-8113 - TwoFactorAuthComponent - WIP on webauthn init.
* PM-8113 - TwoFactorAuthComponent - pull webauthn fallback response handling into primary init with checks based on client for if it should be processed.
* PM-8113 - TwoFactorAuthComponent - move linux popup width extension logic into ExtensionTwoFactorAuthComponentService
* PM-8113 - WebTwoFactorAuthComponentService - add explicit override for web's determineLegacyKeyMigrationAction method.
* PM-8113 - Implement new TwoFactorAuthComponentService .openPopoutIfApprovedForEmail2fa to replace extension specific init logic.
* PM-8113 - TwoFactorAuthComponent - misc cleanup
* PM-8113 - TwoFactorAuthComponent - more clean up
* PM-8113 - TwoFactorAuthComponent - WIP on removing TDE callbacks
* PM-8113 - TwoFactorAuthComponent - finish refactoring out all callbacks
* PM-8113 - TwoFactorAuthComponent - remove now unused method
* PM-8113 - TwoFactorAuthComponent - refactor routes.
* PM-8113 - TwoFactorAuthComponent - add TODO
* PM-8113 - TwoFactorAuthComp - isTrustedDeviceEncEnabled - add undefined check for optional window close. + Add todo
* PM-8113 - TwoFactorAuthComponent tests - updated to pass
* PM-8113 - (1) Consolidate TwoFactorAuthEmail component into new service architecture (2) Move openPopoutIfApprovedForEmail2fa to new TwoFactorAuthEmailComponentService
* PM-8113 - Refactor libs/auth/2fa into barrel files.
* PM-8113 - Move TwoFactorAuthEmail content to own folder.
* PM-8113 - Move 2FA Duo to own comp folder.
* PM-8113 - ExtensionTwoFactorAuthEmailComponentService - Add comment
* PM-8113 - TwoFactorAuthEmailComponentService - add docs
* PM-8113 - TwoFactorAuthDuoComponentService - define top level abstraction and each clients implementation of the duo2faResultListener
* PM-8113 - TwoFactorAuthDuoCompService - add client specific handling for launchDuoFrameless
* PM-8113 - Delete no longer used client specific two factor auth duo components.
* PM-8113 - Register TwoFactorAuthDuoComponentService implementation in each client.
* PM-8113 - TwoFactorAuthComp - add destroy ref to fix warnings.
* PM-8113 - Remove accidentally checked in dev change
* PM-8113 - TwoFactorAuthComp - (1) Add loading state (2) Add missing CheckboxModule import
* PM-8113 - TwoFactorAuthDuoComponent - update takeUntilDestroyed to pass in destroy context as you can't use takeUntilDestroyed in ngOnInit without it.
* PM-8113 - TwoFactorAuthWebAuthnComponent - remove no longer necessary webauthn new tab check as webauthn seems to work without it
* PM-8113 - TwoFactorAuthWebAuthnComp - refactor names and add todo
* PM-8113 - (1) Move WebAuthn 2FA comp to own folder (2) build out client service for new tab logic
* PM-8113 - Register TwoFactorAuthWebAuthnComponentServices
* PM-8113 - Tweak TwoFactorAuthWebAuthnComponentService and add to TwoFactorAuthWebAuthnComponent
* PM-8113 - WebTwoFactorAuthDuoComponentService - fix type issue
* PM-8113 - ExtensionTwoFactorAuthDuoComponentService - attempt to fix type issue.
* PM-8113 - Remove ts-strict-ignore
* PM-8113 - TwoFactorAuthWebAuthnComponent - satisfy strict typescript reqs.
* PM-8113 - TwoFactorAuthComponent - some progress on strict TS conversion
* PM-8113 - TwoFactorAuthComp - fixed all strict typescript issues.
* PM-8113 - TwoFactorAuthComp - remove no longer necessary webauthn code
* PM-8113 - ExtensionTwoFactorAuthComponentService - handleSso2faFlowSuccess - add more context
* PM-8113 - TwoFactorAuthComp - TDE should use same success handler method
* PM-8113 - Fix SSO + 2FA result handling by closing proper popout window
* PM-8113 - Add todo
* PM-8113 - Webauthn 2FA - As webauthn popout doesn't persist SSO state, have to genercize success logic (which should be a good thing but requires confirmation testing).
* PM-8113 - Per main changes, remove deprecated I18nPipe from 2fa comps that use it.
* PM-8113 - Remove more incorrect i18nPipes
* PM-8113 - TwoFactorAuth + Webauthn - Refactor logic
* PM-8113 - TwoFactorAuth - build submitting loading logic
* PM-8113 - TwoFactorAuth - remove loading as submitting.
* PM-8113 - TwoFactorAuth - update to latest authN session timeout logic
* PM-8113 - AuthPopoutWindow - Add new single action popout for email 2FA so we can close it programmatically
* PM-8113 - Update ExtensionTwoFactorAuthComponentService to close email 2FA single action popouts.
* PM-8113 - Fix build after merge conflict issue
* PM-8113 - 2FA - Duo & Email comps - strict typescript adherence.
* PM-8113 - TwoFactorAuth - Clean up unused stuff and get tests passing
* PM-8113 - Clean up used service method + TODO as I've confirmed it works for other flows.
* PM-8113 - TODO: test all comp services
* PM-8113 - TwoFactorAuthComponent Tests - fix tests by removing mock of removed method.
* PM-8113 - Revert changes to login strategies to avoid scope creep for the sake of typescript strictness.
* PM-8113 - ExtensionTwoFactorAuthComponentService tests
* PM-8113 - Test ExtensionTwoFactorAuthDuoComponentService
* PM-8113 - ExtensionTwoFactorAuthEmailComponentService - add tests
* PM-8113 - Test ExtensionTwoFactorAuthWebAuthnComponentService
* PM-8113 - Add 2fa icons (icons need tweaking still)
* PM-8113 - TwoFactorAuthComponent - add setAnonLayoutDataByTwoFactorProviderType and handle email case as POC
* PM-8113 - TwoFactorEmailComp - work on converting to new design
* PM-8113 - Update icons with proper svg with scaling via viewbox
* PM-8113 - Update icons to use proper classes
* PM-8113 - 2FA Auth Comp - Progress on implementing design changes
* PM-8113 - TwoFactorOptionsComponent - add todos
* PM-8113 - 2fa Email Comp - add style changes per discussion with design
* PM-8113 - TwoFactorAuthComponent - use2faRecoveryCode - build out method per discussion with design
* PM-8113 - TwoFactorAuthComp - fix comp tests
* PM-8113 - TwoFactorAuthComp - progress on adding 2fa provider page icons and subtitles
* PM-8113 - Browser Translations - update duoTwoFactorRequiredPageSubtitle to match design discussion
* PM-8113 - TwoFactorAuthComp - more work on getting page title / icons working
* PM-8113 - Add todo
* PM-8113 - TwoFactorAuthDuoComponent Html - remove text that was moved to page subtitle.
* PM-8113 - 2FA Auth Comp - Duo icon works
* PM-8113 - (1) Add Yubico logo icon (2) Rename Yubikey icon to security key icon
* PM-8113 - TwoFactorAuthComp - remove icon from launch duo button per figma
* PM-8113 - Mark old two-factor-options component as v1.
* PM-8113 - Web - TwoFactorOptionsComponentV1 - Fix import
* PM-8113 - Fix more imports
* PM-8113 - Adjust translations based on meeting with Design
* PM-8113 - TwoFactorOptionsComponent - deprecate recovery code functionality
* PM-8113 - TwoFactorOptionsComponent - remove icon disable logic and unused imports
* PM-8113 - 2FA Options Comp rewritten to match figma
* PM-8113 - TwoFactorOptions - (1) Sort providers like setup screen (2) Add responsive scaling
* PM-8113 - Webauthn 2FA - WIP on updating connectors to latest style
* PM-8113 - Webauthn connector - clean up commented out code and restore block style
* PM-8113 - TwoFactorAuthWebAuthn - Add loading state for iframe until webauthn ready
* PM-8113 - Webauthn Iframe - update translation per figma
* PM-8113 - TwoFactorAuthComp - per figma, put webauthn after checkbox.
* PM-8113 - WebAuthn Fallback connector - UI refreshed
* PM-8113 - Two Factor Options - Implement wrapping
* PM-8113 - TwoFactorAuthAuthenticator - Remove text per figma
* PM-8113 - TwoFactorAuthYubikey - Clean up design per figma
* PM-8113 - Refactor all 2FA flows to use either reactive forms or programmatic submission so we get the benefit of onSubmit form validation like we have elsewhere.
* PM-8113 - 2FA Auth Comp - for form validated 2FA methods, add enter support.
* PM-8113 - TwoFactorAuthComp - Add loginSuccessHandlerService
* PM-8113 - DesktopTwoFactorAuthDuoComponentService - add tests
* PM-8113 - WebTwoFactorAuthDuoComponentService test file - WIP on tests
* PM-8113 - WebTwoFactorAuthDuoComponentService - test listenForDuo2faResult
* PM-8113 - TwoFactorAuthComp - (1) remove unused deps (2) get tests passing
* PM-8113 - Add required to inputs
* PM-8113 - TwoFactorAuth - Save off 2FA providers map so we can only show the select another 2FA method if the user actually has more than 1 configured 2FA method.
* PM-8113 - Webauthn iframe styling must be adjusted per client so adjust desktop and browser extension
* PM-8113 - TwoFactorAuthComp - Integrate latest ssoLoginService changes
* PM-8113 - Desktop & Browser routing modules - add new page title per figma
* PM-8113 - WebAuthn - added optional awaiting security key interaction button state to improve UX.
* PM-8113 - TwoFactorAuthComp - refactor to avoid reactive race condition with retrieval of active user id.
* PM-8113 - ExtensionTwoFactorAuthEmailComponentService - force close the popup since it has stopped closing when the popup opens.
* PM-8113 - TwoFactorAuth - refactor enter key press to exempt non-applicable flows from enter key handling
* PM-8113 - Refactor ExtensionTwoFactorAuthComponentService methods to solve issues with submission
* PM-8113 - TwoFactorAuth - fix programmatic submit of form
* PM-8113 - Fix ExtensionTwoFactorAuthComponentService tests
* PM-8113 - Extension - Webauthn iframe - remove -10px margin
* PM-8113 - Extension Routing module - 2FA screens need back button
* PM-8113 - Get Duo working in extension
* PM-8113 - TwoFactorOptions - tweak styling of row styling to better work for extension
* PM-8113 - TwoFactorWebauthnComp - new tab button styling per figma
* PM-8113 - 2FA Comp - Update logic for hiding / showing the remember me checkbox
* PM-8113 - TwoFactorAuthWebAuthnComp - new tab flow - fix remember me
* PM-8113 - Per PR feedback, add TODO for better provider and module structure for auth component client logic services.
* PM-8113 - TwoFactorAuth - add missing TDE offboarding logic.
* PM-8113 - TwoFactorAuthComponent tests - fix tests
* PM-8113 - 2FA Auth Comp HTML - per PR feedback, remove unnecessary margin bottom
* PM-8113 - 2FA Comp - per PR feedback, remove inSsoFlow as it isn't used.
* PM-8113 - TwoFactorOptionsComp - Clean up no longer needed emitters.
* PM-8113 - TwoFactorOptions - per PR feedback, clean up any usage
* PM-8113 - TwoFactorAuthComp - per PR feedback, rename method from selectOtherTwofactorMethod to selectOtherTwoFactorMethod
* PM-8113 - Per PR feedback, fix translations misspelling
* PM-8113 - TwoFactorAuthSecurityKeyIcon - fix hardcoded value
* PM-8113 - TwoFactorAuthSecurityKeyIcon - fix extra "
* PM-8113 - TwoFactorAuthDuo - Per PR feedback, remove empty template.
* PM-8113 - LooseComponentsModule - re-add accidentally removed component
* PM-8113 - TwoFactorAuthWebAuthnIcon - per PR feedback, fix hardcoded stroke value.
* PM-8113 - Desktop AppRoutingModule - per PR feedback, remove unnecessary AnonLayoutWrapperComponent component property.
* PM-8113 - Update apps/browser/src/auth/services/extension-two-factor-auth-duo-component.service.spec.ts to fix misspelling
Co-authored-by: rr-bw <102181210+rr-bw@users.noreply.github.com>
* PM-8113 - TwoFactorAuthComp - Per PR feedback, add trim to token value
* PM-8113 - TwoFactorService - add typescript strict
* PM-8113 - TwoFactorService - per PR feedback, add jsdocs
* PM-8113 - Per PR feedback, fix misspelling
* PM-8113 - Webauthn fallback - per PR feedback fix stroke
* PM-8113 - Update apps/web/src/connectors/webauthn-fallback.html
Co-authored-by: rr-bw <102181210+rr-bw@users.noreply.github.com>
* PM-8113 - Update libs/auth/src/angular/icons/two-factor-auth/two-factor-auth-webauthn.icon.ts
Co-authored-by: rr-bw <102181210+rr-bw@users.noreply.github.com>
---------
Co-authored-by: rr-bw <102181210+rr-bw@users.noreply.github.com>
2025-02-24 09:59:14 -05:00
|
|
|
chunks: ["connectors/webauthn", "styles"],
|
2021-03-16 17:44:31 +01:00
|
|
|
}),
|
2021-08-26 17:39:52 +02:00
|
|
|
new HtmlWebpackPlugin({
|
|
|
|
|
template: "./src/connectors/webauthn-mobile.html",
|
|
|
|
|
filename: "webauthn-mobile-connector.html",
|
2025-06-05 08:39:40 -05:00
|
|
|
chunks: ["connectors/webauthn", "styles"],
|
2021-08-26 17:39:52 +02:00
|
|
|
}),
|
2021-03-16 17:44:31 +01:00
|
|
|
new HtmlWebpackPlugin({
|
|
|
|
|
template: "./src/connectors/webauthn-fallback.html",
|
|
|
|
|
filename: "webauthn-fallback-connector.html",
|
feat(2FA-UI-Refresh): [Auth/PM-8113] - 2FA Components Consolidation and UI Refresh (#12087)
* PM-8113 - Deprecate TwoFactorComponentRefactor feature flag in favor of UnauthenticatedExtensionUIRefresh flag
* PM-8113 - Rename all existing 2FA components as V1.
* PM-8113 - TwoFactorAuthComp - Add comment explaining that tagged unused import is used a dialog.
* PM-8113 - 2FA Auth Comp - deprecate captcha
* PM-8113 - LoginStrategySvc - add todo for deprecation of captcha response
* PM-8113 - TwoFactorAuth tests - remove captcha
* PM-8113 - TwoFactorAuthComp HTML - remove captcha
* PM-8113 - Web Two Factor Auth - update deps
* PM-8113 - Move all new two-factor-auth components into libs/auth instead of libs/angular/src/auth
* PM-8113 - Add new child-components folder to help differentiate between top level page component and child components
* PM-8113 - Add todo for browser TwoFactorAuthEmailComponent
* PM-8113 - TwoFactorAuth - progress on consolidation
* PM-8113 - TwoFactorAuth - add TODO to ensure I don't miss web on success logic
* PM-8113 - TwoFactorAuth - Deprecate browser implementation of two-factor-auth and move all logic into single component - WIP
* PM-8113 - Bring across 2FA session timeout to new 2FA orchestrator comp
* PM-8113 - Export TwoFactorAuth from libs/auth
* PM-8113 - Fix 2FA Auth Comp tests by adding new service deps.
* PM-8113 - Fix TwoFactorAuthExpiredComp imports + TwoFactorAuthComponent imports on other clients.
* PM-8113 - 2FA Auth Comp - Progress on removing onSuccessfulLogin callback
* PM-8113 - 2FA Auth - update deps to private as inheritance will no longer be used.
* PM-8113 - TwoFactorAuthComp - Refactor init a bit.
* PM-8113 - TwoFactorAuthComp - More naming refactors
* PM-8113 - TwoFactorAuth - (1) more refactoring (2) removed onSuccessfulLoginNavigate (3) after successful login we always loginEmailService.clearValues()
* PM-8113 - TwoFactorAuthComp Tests - clean up tests for removed callbacks.
* PM-8113 - TwoFactorAuthComponent - refactor default success route handling
* PM-8113 - TwoFactorAuthComp - More refactoring
* PM-8113 - TwoFactorAuthComp - more refactors
* PM-8113 - TwoFactorAuth - Remove unused service dep
* PM-8113 - TwoFactorAuthComp - Refactor out unused button action text and move checks for continue button visibility into component
* PM-8113 - TwoFactorAuthComponent - Add type for providerData
* PM-8113 - TwoFactorAuthComponent - Add todo
* PM-8113 - TwoFactorAuthComponent - Add client type
* PM-8113 - TwoFactorAuth - implement browser specific SSO + 2FA logic
* PM-8113 - TwoFactorService Abstraction - refactor to use proper functions + mark methods as abstract properly + add null return to getProviders
* PM-8113 - Refactor 2FA Guard logic out of ngOnInit and into own tested guard. Updated all routes.
* PM-8113 - TwoFactorAuthComponent - WIP on webauthn init.
* PM-8113 - TwoFactorAuthComponent - pull webauthn fallback response handling into primary init with checks based on client for if it should be processed.
* PM-8113 - TwoFactorAuthComponent - move linux popup width extension logic into ExtensionTwoFactorAuthComponentService
* PM-8113 - WebTwoFactorAuthComponentService - add explicit override for web's determineLegacyKeyMigrationAction method.
* PM-8113 - Implement new TwoFactorAuthComponentService .openPopoutIfApprovedForEmail2fa to replace extension specific init logic.
* PM-8113 - TwoFactorAuthComponent - misc cleanup
* PM-8113 - TwoFactorAuthComponent - more clean up
* PM-8113 - TwoFactorAuthComponent - WIP on removing TDE callbacks
* PM-8113 - TwoFactorAuthComponent - finish refactoring out all callbacks
* PM-8113 - TwoFactorAuthComponent - remove now unused method
* PM-8113 - TwoFactorAuthComponent - refactor routes.
* PM-8113 - TwoFactorAuthComponent - add TODO
* PM-8113 - TwoFactorAuthComp - isTrustedDeviceEncEnabled - add undefined check for optional window close. + Add todo
* PM-8113 - TwoFactorAuthComponent tests - updated to pass
* PM-8113 - (1) Consolidate TwoFactorAuthEmail component into new service architecture (2) Move openPopoutIfApprovedForEmail2fa to new TwoFactorAuthEmailComponentService
* PM-8113 - Refactor libs/auth/2fa into barrel files.
* PM-8113 - Move TwoFactorAuthEmail content to own folder.
* PM-8113 - Move 2FA Duo to own comp folder.
* PM-8113 - ExtensionTwoFactorAuthEmailComponentService - Add comment
* PM-8113 - TwoFactorAuthEmailComponentService - add docs
* PM-8113 - TwoFactorAuthDuoComponentService - define top level abstraction and each clients implementation of the duo2faResultListener
* PM-8113 - TwoFactorAuthDuoCompService - add client specific handling for launchDuoFrameless
* PM-8113 - Delete no longer used client specific two factor auth duo components.
* PM-8113 - Register TwoFactorAuthDuoComponentService implementation in each client.
* PM-8113 - TwoFactorAuthComp - add destroy ref to fix warnings.
* PM-8113 - Remove accidentally checked in dev change
* PM-8113 - TwoFactorAuthComp - (1) Add loading state (2) Add missing CheckboxModule import
* PM-8113 - TwoFactorAuthDuoComponent - update takeUntilDestroyed to pass in destroy context as you can't use takeUntilDestroyed in ngOnInit without it.
* PM-8113 - TwoFactorAuthWebAuthnComponent - remove no longer necessary webauthn new tab check as webauthn seems to work without it
* PM-8113 - TwoFactorAuthWebAuthnComp - refactor names and add todo
* PM-8113 - (1) Move WebAuthn 2FA comp to own folder (2) build out client service for new tab logic
* PM-8113 - Register TwoFactorAuthWebAuthnComponentServices
* PM-8113 - Tweak TwoFactorAuthWebAuthnComponentService and add to TwoFactorAuthWebAuthnComponent
* PM-8113 - WebTwoFactorAuthDuoComponentService - fix type issue
* PM-8113 - ExtensionTwoFactorAuthDuoComponentService - attempt to fix type issue.
* PM-8113 - Remove ts-strict-ignore
* PM-8113 - TwoFactorAuthWebAuthnComponent - satisfy strict typescript reqs.
* PM-8113 - TwoFactorAuthComponent - some progress on strict TS conversion
* PM-8113 - TwoFactorAuthComp - fixed all strict typescript issues.
* PM-8113 - TwoFactorAuthComp - remove no longer necessary webauthn code
* PM-8113 - ExtensionTwoFactorAuthComponentService - handleSso2faFlowSuccess - add more context
* PM-8113 - TwoFactorAuthComp - TDE should use same success handler method
* PM-8113 - Fix SSO + 2FA result handling by closing proper popout window
* PM-8113 - Add todo
* PM-8113 - Webauthn 2FA - As webauthn popout doesn't persist SSO state, have to genercize success logic (which should be a good thing but requires confirmation testing).
* PM-8113 - Per main changes, remove deprecated I18nPipe from 2fa comps that use it.
* PM-8113 - Remove more incorrect i18nPipes
* PM-8113 - TwoFactorAuth + Webauthn - Refactor logic
* PM-8113 - TwoFactorAuth - build submitting loading logic
* PM-8113 - TwoFactorAuth - remove loading as submitting.
* PM-8113 - TwoFactorAuth - update to latest authN session timeout logic
* PM-8113 - AuthPopoutWindow - Add new single action popout for email 2FA so we can close it programmatically
* PM-8113 - Update ExtensionTwoFactorAuthComponentService to close email 2FA single action popouts.
* PM-8113 - Fix build after merge conflict issue
* PM-8113 - 2FA - Duo & Email comps - strict typescript adherence.
* PM-8113 - TwoFactorAuth - Clean up unused stuff and get tests passing
* PM-8113 - Clean up used service method + TODO as I've confirmed it works for other flows.
* PM-8113 - TODO: test all comp services
* PM-8113 - TwoFactorAuthComponent Tests - fix tests by removing mock of removed method.
* PM-8113 - Revert changes to login strategies to avoid scope creep for the sake of typescript strictness.
* PM-8113 - ExtensionTwoFactorAuthComponentService tests
* PM-8113 - Test ExtensionTwoFactorAuthDuoComponentService
* PM-8113 - ExtensionTwoFactorAuthEmailComponentService - add tests
* PM-8113 - Test ExtensionTwoFactorAuthWebAuthnComponentService
* PM-8113 - Add 2fa icons (icons need tweaking still)
* PM-8113 - TwoFactorAuthComponent - add setAnonLayoutDataByTwoFactorProviderType and handle email case as POC
* PM-8113 - TwoFactorEmailComp - work on converting to new design
* PM-8113 - Update icons with proper svg with scaling via viewbox
* PM-8113 - Update icons to use proper classes
* PM-8113 - 2FA Auth Comp - Progress on implementing design changes
* PM-8113 - TwoFactorOptionsComponent - add todos
* PM-8113 - 2fa Email Comp - add style changes per discussion with design
* PM-8113 - TwoFactorAuthComponent - use2faRecoveryCode - build out method per discussion with design
* PM-8113 - TwoFactorAuthComp - fix comp tests
* PM-8113 - TwoFactorAuthComp - progress on adding 2fa provider page icons and subtitles
* PM-8113 - Browser Translations - update duoTwoFactorRequiredPageSubtitle to match design discussion
* PM-8113 - TwoFactorAuthComp - more work on getting page title / icons working
* PM-8113 - Add todo
* PM-8113 - TwoFactorAuthDuoComponent Html - remove text that was moved to page subtitle.
* PM-8113 - 2FA Auth Comp - Duo icon works
* PM-8113 - (1) Add Yubico logo icon (2) Rename Yubikey icon to security key icon
* PM-8113 - TwoFactorAuthComp - remove icon from launch duo button per figma
* PM-8113 - Mark old two-factor-options component as v1.
* PM-8113 - Web - TwoFactorOptionsComponentV1 - Fix import
* PM-8113 - Fix more imports
* PM-8113 - Adjust translations based on meeting with Design
* PM-8113 - TwoFactorOptionsComponent - deprecate recovery code functionality
* PM-8113 - TwoFactorOptionsComponent - remove icon disable logic and unused imports
* PM-8113 - 2FA Options Comp rewritten to match figma
* PM-8113 - TwoFactorOptions - (1) Sort providers like setup screen (2) Add responsive scaling
* PM-8113 - Webauthn 2FA - WIP on updating connectors to latest style
* PM-8113 - Webauthn connector - clean up commented out code and restore block style
* PM-8113 - TwoFactorAuthWebAuthn - Add loading state for iframe until webauthn ready
* PM-8113 - Webauthn Iframe - update translation per figma
* PM-8113 - TwoFactorAuthComp - per figma, put webauthn after checkbox.
* PM-8113 - WebAuthn Fallback connector - UI refreshed
* PM-8113 - Two Factor Options - Implement wrapping
* PM-8113 - TwoFactorAuthAuthenticator - Remove text per figma
* PM-8113 - TwoFactorAuthYubikey - Clean up design per figma
* PM-8113 - Refactor all 2FA flows to use either reactive forms or programmatic submission so we get the benefit of onSubmit form validation like we have elsewhere.
* PM-8113 - 2FA Auth Comp - for form validated 2FA methods, add enter support.
* PM-8113 - TwoFactorAuthComp - Add loginSuccessHandlerService
* PM-8113 - DesktopTwoFactorAuthDuoComponentService - add tests
* PM-8113 - WebTwoFactorAuthDuoComponentService test file - WIP on tests
* PM-8113 - WebTwoFactorAuthDuoComponentService - test listenForDuo2faResult
* PM-8113 - TwoFactorAuthComp - (1) remove unused deps (2) get tests passing
* PM-8113 - Add required to inputs
* PM-8113 - TwoFactorAuth - Save off 2FA providers map so we can only show the select another 2FA method if the user actually has more than 1 configured 2FA method.
* PM-8113 - Webauthn iframe styling must be adjusted per client so adjust desktop and browser extension
* PM-8113 - TwoFactorAuthComp - Integrate latest ssoLoginService changes
* PM-8113 - Desktop & Browser routing modules - add new page title per figma
* PM-8113 - WebAuthn - added optional awaiting security key interaction button state to improve UX.
* PM-8113 - TwoFactorAuthComp - refactor to avoid reactive race condition with retrieval of active user id.
* PM-8113 - ExtensionTwoFactorAuthEmailComponentService - force close the popup since it has stopped closing when the popup opens.
* PM-8113 - TwoFactorAuth - refactor enter key press to exempt non-applicable flows from enter key handling
* PM-8113 - Refactor ExtensionTwoFactorAuthComponentService methods to solve issues with submission
* PM-8113 - TwoFactorAuth - fix programmatic submit of form
* PM-8113 - Fix ExtensionTwoFactorAuthComponentService tests
* PM-8113 - Extension - Webauthn iframe - remove -10px margin
* PM-8113 - Extension Routing module - 2FA screens need back button
* PM-8113 - Get Duo working in extension
* PM-8113 - TwoFactorOptions - tweak styling of row styling to better work for extension
* PM-8113 - TwoFactorWebauthnComp - new tab button styling per figma
* PM-8113 - 2FA Comp - Update logic for hiding / showing the remember me checkbox
* PM-8113 - TwoFactorAuthWebAuthnComp - new tab flow - fix remember me
* PM-8113 - Per PR feedback, add TODO for better provider and module structure for auth component client logic services.
* PM-8113 - TwoFactorAuth - add missing TDE offboarding logic.
* PM-8113 - TwoFactorAuthComponent tests - fix tests
* PM-8113 - 2FA Auth Comp HTML - per PR feedback, remove unnecessary margin bottom
* PM-8113 - 2FA Comp - per PR feedback, remove inSsoFlow as it isn't used.
* PM-8113 - TwoFactorOptionsComp - Clean up no longer needed emitters.
* PM-8113 - TwoFactorOptions - per PR feedback, clean up any usage
* PM-8113 - TwoFactorAuthComp - per PR feedback, rename method from selectOtherTwofactorMethod to selectOtherTwoFactorMethod
* PM-8113 - Per PR feedback, fix translations misspelling
* PM-8113 - TwoFactorAuthSecurityKeyIcon - fix hardcoded value
* PM-8113 - TwoFactorAuthSecurityKeyIcon - fix extra "
* PM-8113 - TwoFactorAuthDuo - Per PR feedback, remove empty template.
* PM-8113 - LooseComponentsModule - re-add accidentally removed component
* PM-8113 - TwoFactorAuthWebAuthnIcon - per PR feedback, fix hardcoded stroke value.
* PM-8113 - Desktop AppRoutingModule - per PR feedback, remove unnecessary AnonLayoutWrapperComponent component property.
* PM-8113 - Update apps/browser/src/auth/services/extension-two-factor-auth-duo-component.service.spec.ts to fix misspelling
Co-authored-by: rr-bw <102181210+rr-bw@users.noreply.github.com>
* PM-8113 - TwoFactorAuthComp - Per PR feedback, add trim to token value
* PM-8113 - TwoFactorService - add typescript strict
* PM-8113 - TwoFactorService - per PR feedback, add jsdocs
* PM-8113 - Per PR feedback, fix misspelling
* PM-8113 - Webauthn fallback - per PR feedback fix stroke
* PM-8113 - Update apps/web/src/connectors/webauthn-fallback.html
Co-authored-by: rr-bw <102181210+rr-bw@users.noreply.github.com>
* PM-8113 - Update libs/auth/src/angular/icons/two-factor-auth/two-factor-auth-webauthn.icon.ts
Co-authored-by: rr-bw <102181210+rr-bw@users.noreply.github.com>
---------
Co-authored-by: rr-bw <102181210+rr-bw@users.noreply.github.com>
2025-02-24 09:59:14 -05:00
|
|
|
chunks: ["connectors/webauthn-fallback", "styles"],
|
2021-03-16 17:44:31 +01:00
|
|
|
}),
|
2020-07-16 09:18:25 -04:00
|
|
|
new HtmlWebpackPlugin({
|
|
|
|
|
template: "./src/connectors/sso.html",
|
|
|
|
|
filename: "sso-connector.html",
|
2025-04-28 10:14:29 -05:00
|
|
|
chunks: ["connectors/sso", "styles"],
|
2020-07-16 09:18:25 -04:00
|
|
|
}),
|
2024-09-10 11:29:48 -04:00
|
|
|
new HtmlWebpackPlugin({
|
|
|
|
|
template: "./src/connectors/redirect.html",
|
|
|
|
|
filename: "redirect-connector.html",
|
|
|
|
|
chunks: ["connectors/redirect", "styles"],
|
|
|
|
|
}),
|
2024-01-18 13:26:02 -08:00
|
|
|
new HtmlWebpackPlugin({
|
|
|
|
|
template: "./src/connectors/duo-redirect.html",
|
|
|
|
|
filename: "duo-redirect-connector.html",
|
2025-04-11 22:55:02 -04:00
|
|
|
chunks: ["connectors/duo-redirect", "styles"],
|
2024-01-18 13:26:02 -08:00
|
|
|
}),
|
2024-07-30 12:25:24 +02:00
|
|
|
new HtmlWebpackPlugin({
|
|
|
|
|
template: "./src/404.html",
|
|
|
|
|
filename: "404.html",
|
|
|
|
|
chunks: ["styles"],
|
2024-09-19 14:56:47 +02:00
|
|
|
// 404 page is a wildcard, this ensures it uses absolute paths.
|
|
|
|
|
publicPath: "/",
|
2024-07-30 12:25:24 +02:00
|
|
|
}),
|
2021-04-22 21:29:29 +02:00
|
|
|
new CopyWebpackPlugin({
|
|
|
|
|
patterns: [
|
|
|
|
|
{ from: "./src/.nojekyll" },
|
|
|
|
|
{ from: "./src/manifest.json" },
|
|
|
|
|
{ from: "./src/favicon.ico" },
|
|
|
|
|
{ from: "./src/browserconfig.xml" },
|
|
|
|
|
{ from: "./src/app-id.json" },
|
|
|
|
|
{ from: "./src/images", to: "images" },
|
|
|
|
|
{ from: "./src/locales", to: "locales" },
|
2022-06-02 17:59:43 +02:00
|
|
|
{ from: "../../node_modules/qrious/dist/qrious.min.js", to: "scripts" },
|
|
|
|
|
{ from: "../../node_modules/braintree-web-drop-in/dist/browser/dropin.js", to: "scripts" },
|
2021-09-24 18:24:58 +02:00
|
|
|
{
|
|
|
|
|
from: "./src/version.json",
|
|
|
|
|
transform(content, path) {
|
|
|
|
|
return content.toString().replace("process.env.APPLICATION_VERSION", pjson.version);
|
|
|
|
|
},
|
|
|
|
|
},
|
2021-04-22 21:29:29 +02:00
|
|
|
],
|
|
|
|
|
}),
|
2020-05-08 17:42:28 +02:00
|
|
|
new MiniCssExtractPlugin({
|
2021-12-09 21:12:53 +00:00
|
|
|
filename: "[name].[contenthash].css",
|
|
|
|
|
chunkFilename: "[id].[contenthash].css",
|
2020-05-08 17:42:28 +02:00
|
|
|
}),
|
2022-07-26 14:48:11 +02:00
|
|
|
new webpack.ProvidePlugin({
|
|
|
|
|
process: "process/browser.js",
|
|
|
|
|
}),
|
2021-07-26 08:51:25 -05:00
|
|
|
new webpack.EnvironmentPlugin({
|
|
|
|
|
ENV: ENV,
|
|
|
|
|
NODE_ENV: NODE_ENV === "production" ? "production" : "development",
|
|
|
|
|
APPLICATION_VERSION: pjson.version,
|
|
|
|
|
CACHE_TAG: Math.random().toString(36).substring(7),
|
2021-08-25 14:15:31 -04:00
|
|
|
URLS: envConfig["urls"] ?? {},
|
2021-09-09 14:18:46 -07:00
|
|
|
STRIPE_KEY: envConfig["stripeKey"] ?? "",
|
|
|
|
|
BRAINTREE_KEY: envConfig["braintreeKey"] ?? "",
|
|
|
|
|
PAYPAL_CONFIG: envConfig["paypal"] ?? {},
|
2022-07-13 12:22:58 -04:00
|
|
|
FLAGS: envConfig["flags"] ?? {},
|
2024-02-02 05:56:09 -08:00
|
|
|
DEV_FLAGS: NODE_ENV === "development" ? envConfig["devFlags"] : {},
|
2024-03-21 17:09:44 +01:00
|
|
|
ADDITIONAL_REGIONS: envConfig["additionalRegions"] ?? [],
|
2018-06-04 23:10:41 -04:00
|
|
|
}),
|
2021-12-09 21:12:53 +00:00
|
|
|
new AngularWebpackPlugin({
|
2024-09-19 15:00:07 +02:00
|
|
|
tsconfig: "tsconfig.build.json",
|
2018-06-04 23:10:41 -04:00
|
|
|
entryModule: "src/app/app.module#AppModule",
|
|
|
|
|
sourceMap: true,
|
2021-04-22 21:29:29 +02:00
|
|
|
}),
|
|
|
|
|
];
|
2018-06-04 23:10:41 -04:00
|
|
|
|
2018-09-18 11:59:03 -04:00
|
|
|
// ref: https://webpack.js.org/configuration/dev-server/#devserver
|
2018-06-05 11:14:53 -04:00
|
|
|
let certSuffix = fs.existsSync("dev-server.local.pem") ? ".local" : ".shared";
|
2021-10-22 07:50:08 -05:00
|
|
|
const devServer =
|
|
|
|
|
NODE_ENV !== "development"
|
|
|
|
|
? {}
|
|
|
|
|
: {
|
2021-12-09 21:12:53 +00:00
|
|
|
server: {
|
|
|
|
|
type: "https",
|
|
|
|
|
options: {
|
|
|
|
|
key: fs.readFileSync("dev-server" + certSuffix + ".pem"),
|
|
|
|
|
cert: fs.readFileSync("dev-server" + certSuffix + ".pem"),
|
2021-12-17 15:57:11 +01:00
|
|
|
},
|
2021-12-09 21:12:53 +00:00
|
|
|
},
|
2018-07-10 10:47:31 -04:00
|
|
|
// host: '192.168.1.9',
|
2024-03-25 15:27:45 -05:00
|
|
|
proxy: [
|
|
|
|
|
{
|
|
|
|
|
context: ["/api"],
|
2021-10-22 07:50:08 -05:00
|
|
|
target: envConfig.dev?.proxyApi,
|
2021-04-09 09:57:25 +02:00
|
|
|
pathRewrite: { "^/api": "" },
|
|
|
|
|
secure: false,
|
|
|
|
|
changeOrigin: true,
|
2021-04-05 22:38:21 +02:00
|
|
|
},
|
2024-03-25 15:27:45 -05:00
|
|
|
{
|
|
|
|
|
context: ["/identity"],
|
2021-10-22 07:50:08 -05:00
|
|
|
target: envConfig.dev?.proxyIdentity,
|
2021-04-09 09:57:25 +02:00
|
|
|
pathRewrite: { "^/identity": "" },
|
|
|
|
|
secure: false,
|
|
|
|
|
changeOrigin: true,
|
2021-04-05 22:38:21 +02:00
|
|
|
},
|
2024-03-25 15:27:45 -05:00
|
|
|
{
|
|
|
|
|
context: ["/events"],
|
2021-10-22 07:50:08 -05:00
|
|
|
target: envConfig.dev?.proxyEvents,
|
2021-04-09 09:57:25 +02:00
|
|
|
pathRewrite: { "^/events": "" },
|
2021-04-05 22:38:21 +02:00
|
|
|
secure: false,
|
|
|
|
|
changeOrigin: true,
|
|
|
|
|
},
|
2024-03-25 15:27:45 -05:00
|
|
|
{
|
|
|
|
|
context: ["/notifications"],
|
2021-10-22 07:50:08 -05:00
|
|
|
target: envConfig.dev?.proxyNotifications,
|
2021-04-09 09:57:25 +02:00
|
|
|
pathRewrite: { "^/notifications": "" },
|
2021-04-05 22:38:21 +02:00
|
|
|
secure: false,
|
|
|
|
|
changeOrigin: true,
|
2023-07-27 09:05:19 -07:00
|
|
|
ws: true,
|
2021-12-17 15:57:11 +01:00
|
|
|
},
|
2024-03-25 15:27:45 -05:00
|
|
|
{
|
|
|
|
|
context: ["/icons"],
|
2022-09-07 10:36:05 -06:00
|
|
|
target: envConfig.dev?.proxyIcons,
|
|
|
|
|
pathRewrite: { "^/icons": "" },
|
|
|
|
|
secure: false,
|
|
|
|
|
changeOrigin: true,
|
|
|
|
|
},
|
2024-03-25 15:27:45 -05:00
|
|
|
],
|
2022-02-22 15:46:59 +01:00
|
|
|
headers: (req) => {
|
2022-03-02 15:27:34 -05:00
|
|
|
if (!req.originalUrl.includes("connector.html")) {
|
2022-09-29 15:24:04 +02:00
|
|
|
return {
|
|
|
|
|
"Content-Security-Policy": `
|
|
|
|
|
default-src 'self'
|
|
|
|
|
;script-src
|
|
|
|
|
'self'
|
2023-01-26 15:20:12 +01:00
|
|
|
'wasm-unsafe-eval'
|
2022-09-29 15:24:04 +02:00
|
|
|
'sha256-ryoU+5+IUZTuUyTElqkrQGBJXr1brEv6r2CA62WUw8w='
|
|
|
|
|
https://js.stripe.com
|
|
|
|
|
https://js.braintreegateway.com
|
|
|
|
|
https://www.paypalobjects.com
|
|
|
|
|
;style-src
|
|
|
|
|
'self'
|
|
|
|
|
https://assets.braintreegateway.com
|
|
|
|
|
https://*.paypal.com
|
2025-06-09 10:34:30 -04:00
|
|
|
${"'sha256-47DEQpj8HBSa+/TImW+5JCeuQeRkm5NMpJWZG3hSuFU='" /* date input polyfill */}
|
|
|
|
|
${"'sha256-JVRXyYPueLWdwGwY9m/7u4QlZ1xeQdqUj2t8OVIzZE4='" /* date input polyfill */}
|
|
|
|
|
${"'sha256-EnIJNDxVnh0++RytXJOkU0sqtLDFt1nYUDOfeJ5SKxg='" /* ng-select */}
|
|
|
|
|
${"'sha256-dbBsIsz2pJ5loaLjhE6xWlmhYdjl6ghbwnGSCr4YObs='" /* cdk-virtual-scroll */}
|
|
|
|
|
${"'sha256-S+uMh1G1SNQDAMG3seBmknQ26Wh+KSEoKdsNiy0joEE='" /* cdk-visually-hidden */}
|
2022-09-29 15:24:04 +02:00
|
|
|
;img-src
|
|
|
|
|
'self'
|
|
|
|
|
data:
|
|
|
|
|
https://icons.bitwarden.net
|
|
|
|
|
https://*.paypal.com
|
|
|
|
|
https://www.paypalobjects.com
|
|
|
|
|
https://q.stripe.com
|
|
|
|
|
https://haveibeenpwned.com
|
|
|
|
|
;child-src
|
|
|
|
|
'self'
|
|
|
|
|
https://js.stripe.com
|
|
|
|
|
https://assets.braintreegateway.com
|
|
|
|
|
https://*.paypal.com
|
|
|
|
|
https://*.duosecurity.com
|
|
|
|
|
;frame-src
|
|
|
|
|
'self'
|
|
|
|
|
https://js.stripe.com
|
|
|
|
|
https://assets.braintreegateway.com
|
|
|
|
|
https://*.paypal.com
|
|
|
|
|
https://*.duosecurity.com
|
|
|
|
|
;connect-src
|
|
|
|
|
'self'
|
2024-01-22 08:39:27 -05:00
|
|
|
${envConfig.dev.wsConnectSrc ?? ""}
|
2022-09-29 15:24:04 +02:00
|
|
|
wss://notifications.bitwarden.com
|
|
|
|
|
https://notifications.bitwarden.com
|
|
|
|
|
https://cdn.bitwarden.net
|
|
|
|
|
https://api.pwnedpasswords.com
|
2023-01-03 19:53:31 +01:00
|
|
|
https://api.2fa.directory/v3/totp.json
|
2022-09-29 15:24:04 +02:00
|
|
|
https://api.stripe.com
|
|
|
|
|
https://www.paypal.com
|
2023-09-25 09:53:50 -04:00
|
|
|
https://api.sandbox.braintreegateway.com
|
2022-09-29 15:24:04 +02:00
|
|
|
https://api.braintreegateway.com
|
|
|
|
|
https://client-analytics.braintreegateway.com
|
|
|
|
|
https://*.braintree-api.com
|
|
|
|
|
https://*.blob.core.windows.net
|
2022-10-18 10:32:21 +02:00
|
|
|
http://127.0.0.1:10000
|
2022-09-29 15:24:04 +02:00
|
|
|
https://app.simplelogin.io/api/alias/random/new
|
|
|
|
|
https://quack.duckduckgo.com/api/email/addresses
|
2023-09-26 15:34:34 +02:00
|
|
|
https://app.addy.io/api/v1/aliases
|
2022-09-29 15:24:04 +02:00
|
|
|
https://api.fastmail.com
|
2023-06-09 02:55:12 -05:00
|
|
|
https://api.forwardemail.net
|
2022-11-18 16:38:28 -05:00
|
|
|
http://localhost:5000
|
2022-09-29 15:24:04 +02:00
|
|
|
;object-src
|
|
|
|
|
'self'
|
|
|
|
|
blob:
|
|
|
|
|
;`
|
|
|
|
|
.replace(/\n/g, " ")
|
|
|
|
|
.replace(/ +(?= )/g, ""),
|
|
|
|
|
};
|
2022-02-22 15:46:59 +01:00
|
|
|
}
|
|
|
|
|
},
|
2021-04-09 09:57:25 +02:00
|
|
|
hot: false,
|
2022-03-23 14:53:41 -04:00
|
|
|
port: envConfig.dev?.port ?? 8080,
|
2021-12-09 21:12:53 +00:00
|
|
|
allowedHosts: envConfig.dev?.allowedHosts ?? "auto",
|
|
|
|
|
client: {
|
|
|
|
|
overlay: {
|
|
|
|
|
errors: true,
|
|
|
|
|
warnings: false,
|
2023-07-27 09:05:19 -07:00
|
|
|
runtimeErrors: false,
|
2021-12-17 15:57:11 +01:00
|
|
|
},
|
2021-12-09 21:12:53 +00:00
|
|
|
},
|
2021-04-09 09:57:25 +02:00
|
|
|
};
|
|
|
|
|
|
2021-04-21 11:29:33 -07:00
|
|
|
const webpackConfig = {
|
|
|
|
|
mode: NODE_ENV,
|
2018-06-05 11:52:09 -04:00
|
|
|
devtool: "source-map",
|
2018-09-18 11:59:03 -04:00
|
|
|
devServer: devServer,
|
2024-10-07 13:20:50 +02:00
|
|
|
target: "web",
|
2018-06-04 23:10:41 -04:00
|
|
|
entry: {
|
2022-07-25 15:13:54 +02:00
|
|
|
"app/polyfills": "./src/polyfills.ts",
|
|
|
|
|
"app/main": "./src/main.ts",
|
2021-03-16 17:44:31 +01:00
|
|
|
"connectors/webauthn": "./src/connectors/webauthn.ts",
|
|
|
|
|
"connectors/webauthn-fallback": "./src/connectors/webauthn-fallback.ts",
|
2020-07-16 09:18:25 -04:00
|
|
|
"connectors/sso": "./src/connectors/sso.ts",
|
2024-01-18 13:26:02 -08:00
|
|
|
"connectors/duo-redirect": "./src/connectors/duo-redirect.ts",
|
2024-09-10 11:29:48 -04:00
|
|
|
"connectors/redirect": "./src/connectors/redirect.ts",
|
2024-07-30 12:25:24 +02:00
|
|
|
styles: ["./src/scss/styles.scss", "./src/scss/tailwind.css"],
|
2024-03-13 10:25:39 -05:00
|
|
|
theme_head: "./src/theme.ts",
|
2018-06-04 23:10:41 -04:00
|
|
|
},
|
2025-03-11 18:20:32 +01:00
|
|
|
cache:
|
|
|
|
|
NODE_ENV === "production"
|
|
|
|
|
? false
|
|
|
|
|
: {
|
|
|
|
|
type: "filesystem",
|
|
|
|
|
allowCollectingMemory: true,
|
|
|
|
|
cacheDirectory: path.resolve(__dirname, "../../node_modules/.cache/webpack"),
|
|
|
|
|
buildDependencies: {
|
|
|
|
|
config: [__filename],
|
|
|
|
|
},
|
|
|
|
|
},
|
|
|
|
|
snapshot: {
|
|
|
|
|
unmanagedPaths: [path.resolve(__dirname, "../../node_modules/@bitwarden/")],
|
|
|
|
|
},
|
2018-07-20 22:46:03 -04:00
|
|
|
optimization: {
|
|
|
|
|
splitChunks: {
|
|
|
|
|
cacheGroups: {
|
|
|
|
|
commons: {
|
|
|
|
|
test: /[\\/]node_modules[\\/]/,
|
|
|
|
|
name: "app/vendor",
|
|
|
|
|
chunks: (chunk) => {
|
|
|
|
|
return chunk.name === "app/main";
|
|
|
|
|
},
|
|
|
|
|
},
|
2019-04-20 20:54:50 -04:00
|
|
|
},
|
2018-07-20 22:46:03 -04:00
|
|
|
},
|
2025-03-11 18:20:32 +01:00
|
|
|
minimize: NODE_ENV === "production",
|
2018-06-04 23:10:41 -04:00
|
|
|
minimizer: [
|
|
|
|
|
new TerserPlugin({
|
|
|
|
|
terserOptions: {
|
|
|
|
|
safari10: true,
|
2022-03-22 10:00:07 +01:00
|
|
|
// Replicate Angular CLI behaviour
|
|
|
|
|
compress: {
|
|
|
|
|
global_defs: {
|
|
|
|
|
ngDevMode: false,
|
|
|
|
|
ngI18nClosureMode: false,
|
|
|
|
|
},
|
|
|
|
|
},
|
2021-12-09 21:12:53 +00:00
|
|
|
},
|
2021-12-17 15:57:11 +01:00
|
|
|
}),
|
|
|
|
|
],
|
|
|
|
|
},
|
|
|
|
|
resolve: {
|
2018-06-04 23:10:41 -04:00
|
|
|
extensions: [".ts", ".js"],
|
|
|
|
|
symlinks: false,
|
2022-06-02 17:59:43 +02:00
|
|
|
modules: [path.resolve("../../node_modules")],
|
2021-12-09 21:12:53 +00:00
|
|
|
fallback: {
|
|
|
|
|
buffer: false,
|
|
|
|
|
util: require.resolve("util/"),
|
|
|
|
|
assert: false,
|
2022-02-24 12:10:07 +01:00
|
|
|
url: false,
|
2023-01-26 15:20:12 +01:00
|
|
|
fs: false,
|
|
|
|
|
process: false,
|
2023-02-03 14:24:49 -05:00
|
|
|
path: require.resolve("path-browserify"),
|
2018-06-04 23:10:41 -04:00
|
|
|
},
|
2021-12-17 15:57:11 +01:00
|
|
|
},
|
2018-06-04 23:10:41 -04:00
|
|
|
output: {
|
2021-12-09 21:12:53 +00:00
|
|
|
filename: "[name].[contenthash].js",
|
2018-06-04 23:10:41 -04:00
|
|
|
path: path.resolve(__dirname, "build"),
|
2024-03-12 18:02:47 +01:00
|
|
|
clean: true,
|
2018-06-04 23:10:41 -04:00
|
|
|
},
|
2023-01-26 15:20:12 +01:00
|
|
|
module: {
|
2024-10-07 13:20:50 +02:00
|
|
|
noParse: /argon2(-simd)?\.wasm$/,
|
2023-01-26 15:20:12 +01:00
|
|
|
rules: moduleRules,
|
|
|
|
|
},
|
2024-10-07 13:20:50 +02:00
|
|
|
experiments: {
|
|
|
|
|
asyncWebAssembly: true,
|
|
|
|
|
},
|
2018-06-04 23:10:41 -04:00
|
|
|
plugins: plugins,
|
|
|
|
|
};
|
|
|
|
|
|
2021-04-21 11:29:33 -07:00
|
|
|
module.exports = webpackConfig;
|