diff --git a/src/connectors/webauthn.html b/connectors/src/webauthn.html
similarity index 58%
rename from src/connectors/webauthn.html
rename to connectors/src/webauthn.html
index 2e77cc0d..eef78df8 100644
--- a/src/connectors/webauthn.html
+++ b/connectors/src/webauthn.html
@@ -7,9 +7,9 @@
diff --git a/src/connectors/common-webauthn.ts b/connectors/src/webauthn/common-webauthn.ts
similarity index 100%
rename from src/connectors/common-webauthn.ts
rename to connectors/src/webauthn/common-webauthn.ts
diff --git a/src/connectors/webauthn-fallback.ts b/connectors/src/webauthn/webauthn-fallback.ts
similarity index 98%
rename from src/connectors/webauthn-fallback.ts
rename to connectors/src/webauthn/webauthn-fallback.ts
index e4020431..090c913c 100644
--- a/src/connectors/webauthn-fallback.ts
+++ b/connectors/src/webauthn/webauthn-fallback.ts
@@ -1,4 +1,4 @@
-import { b64Decode, getQsParam } from "./common";
+import { b64Decode, getQsParam } from "../common";
import { buildDataString, parseWebauthnJson } from "./common-webauthn";
// tslint:disable-next-line
diff --git a/connectors/src/webauthn/webauthn.scss b/connectors/src/webauthn/webauthn.scss
new file mode 100644
index 00000000..42dbd942
--- /dev/null
+++ b/connectors/src/webauthn/webauthn.scss
@@ -0,0 +1,109 @@
+@import "../common/styles.scss";
+
+body {
+ min-width: 0px !important;
+}
+
+.mb-3,
+.my-3 {
+ margin-bottom: 1rem !important;
+}
+
+.rounded {
+ border-radius: 0.25rem !important;
+}
+
+.img-fluid {
+ max-width: 100%;
+ height: auto;
+}
+
+.text-center {
+ text-align: center !important;
+}
+
+.btn {
+ display: inline-block;
+ font-weight: 600;
+ color: #333;
+ text-align: center;
+ vertical-align: middle;
+ user-select: none;
+ background-color: transparent;
+ border: 1px solid transparent;
+ border-top-color: transparent;
+ border-right-color: transparent;
+ border-bottom-color: transparent;
+ border-left-color: transparent;
+ padding: 0.375rem 0.75rem;
+ font-size: 1rem;
+ line-height: 1.5;
+ border-radius: 0.25rem;
+ transition: color 0.15s ease-in-out, background-color 0.15s ease-in-out,
+ border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
+}
+
+.btn-primary {
+ color: #fff;
+ background-color: #175ddc;
+ border-color: #175ddc;
+}
+
+.btn:not(:disabled):not(.disabled) {
+ cursor: pointer;
+}
+
+.btn:hover,
+.swal2-popup .swal2-actions button:hover {
+ color: #333;
+ text-decoration: none;
+}
+
+.btn-primary:hover {
+ color: #fff;
+ background-color: #134eb9;
+ border-color: #1249ae;
+}
+
+/** MOBILE **/
+
+.mt-5,
+.my-5 {
+ margin-top: 3rem !important;
+}
+
+.justify-content-md-center {
+ justify-content: center !important;
+}
+
+.row {
+ display: flex;
+ flex-wrap: wrap;
+ margin-right: -10px;
+ margin-left: -10px;
+}
+
+.mb-2,
+.my-2 {
+ margin-bottom: 0.5rem !important;
+}
+
+.ml-4,
+.mx-4 {
+ margin-left: 1.5rem !important;
+}
+
+.mb-4,
+.my-4 {
+ margin-bottom: 1.5rem !important;
+}
+
+.mr-4,
+.mx-4 {
+ margin-right: 1.5rem !important;
+}
+
+.lead {
+ font-size: 1.25rem;
+ font-weight: normal;
+}
diff --git a/src/connectors/webauthn.ts b/connectors/src/webauthn/webauthn.ts
similarity index 98%
rename from src/connectors/webauthn.ts
rename to connectors/src/webauthn/webauthn.ts
index 32097c0a..fa42e08f 100644
--- a/src/connectors/webauthn.ts
+++ b/connectors/src/webauthn/webauthn.ts
@@ -1,4 +1,4 @@
-import { b64Decode, getQsParam } from "./common";
+import { b64Decode, getQsParam } from "../common";
import { buildDataString, parseWebauthnJson } from "./common-webauthn";
// tslint:disable-next-line
diff --git a/connectors/webpack.config.js b/connectors/webpack.config.js
new file mode 100644
index 00000000..85f9a5d3
--- /dev/null
+++ b/connectors/webpack.config.js
@@ -0,0 +1,155 @@
+const path = require("path");
+const webpack = require("webpack");
+const { CleanWebpackPlugin } = require("clean-webpack-plugin");
+const HtmlWebpackPlugin = require("html-webpack-plugin");
+const HtmlWebpackInjector = require("html-webpack-injector");
+const CopyWebpackPlugin = require("copy-webpack-plugin");
+const MiniCssExtractPlugin = require("mini-css-extract-plugin");
+const TerserPlugin = require("terser-webpack-plugin");
+const pjson = require("../package.json");
+
+const NODE_ENV = process.env.NODE_ENV == null ? "development" : process.env.NODE_ENV;
+
+const moduleRules = [
+ {
+ test: /\.ts$/,
+ enforce: "pre",
+ loader: "tslint-loader",
+ },
+ {
+ test: /\.tsx?$/,
+ use: [
+ {
+ loader: "ts-loader",
+ options: {
+ transpileOnly: true,
+ },
+ },
+ ],
+ },
+ {
+ test: /\.(html)$/,
+ loader: "html-loader",
+ },
+ {
+ test: /.(ttf|otf|eot|svg|woff(2)?)(\?[a-z0-9]+)?$/,
+ exclude: /loading(|-white).svg/,
+ generator: {
+ filename: "fonts/[name][ext]",
+ },
+ type: "asset/resource",
+ },
+ {
+ test: /\.(jpe?g|png|gif|svg|webp|avif)$/i,
+ exclude: /.*(fontawesome-webfont)\.svg/,
+ generator: {
+ filename: "images/[name][ext]",
+ },
+ type: "asset/resource",
+ },
+ {
+ test: /\.scss$/,
+ use: [
+ {
+ loader: MiniCssExtractPlugin.loader,
+ },
+ "css-loader",
+ "sass-loader",
+ ],
+ },
+];
+
+const plugins = [
+ new HtmlWebpackInjector(),
+ new HtmlWebpackPlugin({
+ template: "./src/duo.html",
+ filename: "duo.html",
+ chunks: ["connectors/duo"],
+ }),
+ new HtmlWebpackPlugin({
+ template: "./src/webauthn.html",
+ filename: "webauthn.html",
+ chunks: ["connectors/webauthn"],
+ }),
+ new HtmlWebpackPlugin({
+ template: "./src/webauthn-mobile.html",
+ filename: "webauthn-mobile.html",
+ chunks: ["connectors/webauthn"],
+ }),
+ new HtmlWebpackPlugin({
+ template: "./src/webauthn-fallback.html",
+ filename: "webauthn-fallback.html",
+ chunks: ["connectors/webauthn-fallback"],
+ }),
+ new HtmlWebpackPlugin({
+ template: "./src/sso.html",
+ filename: "sso.html",
+ chunks: ["connectors/sso"],
+ }),
+ new HtmlWebpackPlugin({
+ template: "./src/captcha.html",
+ filename: "captcha.html",
+ chunks: ["connectors/captcha"],
+ }),
+ new HtmlWebpackPlugin({
+ template: "./src/captcha-mobile.html",
+ filename: "captcha-mobile.html",
+ chunks: ["connectors/captcha"],
+ }),
+
+ new MiniCssExtractPlugin({
+ filename: "[name].[contenthash].css",
+ chunkFilename: "[id].[contenthash].css",
+ }),
+];
+
+const webpackConfig = {
+ mode: NODE_ENV,
+ devtool: "source-map",
+ entry: {
+ "connectors/webauthn": "./src/webauthn/webauthn.ts",
+ "connectors/webauthn-fallback": "./src/webauthn/webauthn-fallback.ts",
+ "connectors/duo": "./src/duo/duo.ts",
+ "connectors/sso": "./src/sso/sso.ts",
+ "connectors/captcha": "./src/captcha/captcha.ts",
+ },
+ optimization: {
+ splitChunks: {
+ cacheGroups: {
+ commons: {
+ test: /[\\/]node_modules[\\/]/,
+ name: "app/vendor",
+ chunks: (chunk) => {
+ return chunk.name === "app/main";
+ },
+ },
+ },
+ },
+ minimizer: [
+ new TerserPlugin({
+ terserOptions: {
+ safari10: true,
+ },
+ }),
+ ],
+ },
+ resolve: {
+ extensions: [".ts", ".js"],
+ symlinks: false,
+ modules: [path.resolve("../", "node_modules")],
+ fallback: {
+ buffer: false,
+ util: require.resolve("util/"),
+ assert: false,
+ },
+ },
+ output: {
+ filename: "[name].[contenthash].js",
+ path: path.resolve(__dirname, "build"),
+ clean: true,
+ },
+ module: { rules: moduleRules },
+ plugins: plugins,
+};
+
+module.exports = webpackConfig;
diff --git a/src/connectors/captcha-mobile.scss b/src/connectors/captcha-mobile.scss
deleted file mode 100644
index a4c7f9b2..00000000
--- a/src/connectors/captcha-mobile.scss
+++ /dev/null
@@ -1 +0,0 @@
-@import "../scss/styles.scss";
diff --git a/src/connectors/sso.html b/src/connectors/sso.html
deleted file mode 100644
index b2ebc782..00000000
--- a/src/connectors/sso.html
+++ /dev/null
@@ -1,33 +0,0 @@
-
-
-
-
-
-
-
-
Bitwarden
-
-
-
-
-
-
-
-
-
-
-
-

-
-
-
-
-
diff --git a/src/connectors/sso.scss b/src/connectors/sso.scss
deleted file mode 100644
index a4c7f9b2..00000000
--- a/src/connectors/sso.scss
+++ /dev/null
@@ -1 +0,0 @@
-@import "../scss/styles.scss";
diff --git a/src/connectors/webauthn.scss b/src/connectors/webauthn.scss
deleted file mode 100644
index 5cca0413..00000000
--- a/src/connectors/webauthn.scss
+++ /dev/null
@@ -1,5 +0,0 @@
-@import "../scss/styles.scss";
-
-body {
- min-width: 0px !important;
-}
diff --git a/webpack.config.js b/webpack.config.js
index db713362..dfdad194 100644
--- a/webpack.config.js
+++ b/webpack.config.js
@@ -72,41 +72,6 @@ const plugins = [
chunks: ["theme_head", "app/polyfills", "app/vendor", "app/main"],
}),
new HtmlWebpackInjector(),
- new HtmlWebpackPlugin({
- template: "./src/connectors/duo.html",
- filename: "duo-connector.html",
- chunks: ["connectors/duo"],
- }),
- new HtmlWebpackPlugin({
- template: "./src/connectors/webauthn.html",
- filename: "webauthn-connector.html",
- chunks: ["connectors/webauthn"],
- }),
- new HtmlWebpackPlugin({
- template: "./src/connectors/webauthn-mobile.html",
- filename: "webauthn-mobile-connector.html",
- chunks: ["connectors/webauthn"],
- }),
- new HtmlWebpackPlugin({
- template: "./src/connectors/webauthn-fallback.html",
- filename: "webauthn-fallback-connector.html",
- chunks: ["connectors/webauthn-fallback"],
- }),
- new HtmlWebpackPlugin({
- template: "./src/connectors/sso.html",
- filename: "sso-connector.html",
- chunks: ["connectors/sso"],
- }),
- new HtmlWebpackPlugin({
- template: "./src/connectors/captcha.html",
- filename: "captcha-connector.html",
- chunks: ["connectors/captcha"],
- }),
- new HtmlWebpackPlugin({
- template: "./src/connectors/captcha-mobile.html",
- filename: "captcha-mobile-connector.html",
- chunks: ["connectors/captcha"],
- }),
new CopyWebpackPlugin({
patterns: [
{ from: "./src/.nojekyll" },
@@ -209,11 +174,6 @@ const webpackConfig = {
entry: {
"app/polyfills": "./src/app/polyfills.ts",
"app/main": "./src/app/main.ts",
- "connectors/webauthn": "./src/connectors/webauthn.ts",
- "connectors/webauthn-fallback": "./src/connectors/webauthn-fallback.ts",
- "connectors/duo": "./src/connectors/duo.ts",
- "connectors/sso": "./src/connectors/sso.ts",
- "connectors/captcha": "./src/connectors/captcha.ts",
theme_head: "./src/theme.js",
},
optimization: {