-
-
\ No newline at end of file
+
\ No newline at end of file
diff --git a/resources/js/components/FieldError.vue b/resources/js/components/FieldError.vue
deleted file mode 100644
index ad6e7e17..00000000
--- a/resources/js/components/FieldError.vue
+++ /dev/null
@@ -1,23 +0,0 @@
-
-
-
-
-
-
\ No newline at end of file
+
+
\ No newline at end of file
diff --git a/resources/js/views/settings/OAuth.vue b/resources/js/views/settings/OAuth.vue
index 951970f6..e08a6fbb 100644
--- a/resources/js/views/settings/OAuth.vue
+++ b/resources/js/views/settings/OAuth.vue
@@ -1,30 +1,170 @@
+
+
-
-
-
\ No newline at end of file
+
\ No newline at end of file
diff --git a/resources/js/views/settings/PATokens/Create.vue b/resources/js/views/settings/PATokens/Create.vue
deleted file mode 100644
index 042dbe15..00000000
--- a/resources/js/views/settings/PATokens/Create.vue
+++ /dev/null
@@ -1,43 +0,0 @@
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/resources/js/views/settings/Settings.vue b/resources/js/views/settings/Settings.vue
deleted file mode 100644
index d5809374..00000000
--- a/resources/js/views/settings/Settings.vue
+++ /dev/null
@@ -1,43 +0,0 @@
-
-
-
-
-
\ No newline at end of file
diff --git a/resources/js/views/settings/WebAuthn.vue b/resources/js/views/settings/WebAuthn.vue
index 5318e77e..9f582cc8 100644
--- a/resources/js/views/settings/WebAuthn.vue
+++ b/resources/js/views/settings/WebAuthn.vue
@@ -1,8 +1,125 @@
+
+
-
-
-
\ No newline at end of file
+
\ No newline at end of file
diff --git a/resources/js_vue3/views/twofaccounts/Accounts.vue b/resources/js/views/twofaccounts/Accounts.vue
similarity index 100%
rename from resources/js_vue3/views/twofaccounts/Accounts.vue
rename to resources/js/views/twofaccounts/Accounts.vue
diff --git a/resources/js_vue3/views/twofaccounts/Capture.vue b/resources/js/views/twofaccounts/Capture.vue
similarity index 100%
rename from resources/js_vue3/views/twofaccounts/Capture.vue
rename to resources/js/views/twofaccounts/Capture.vue
diff --git a/resources/js/views/twofaccounts/Create.vue b/resources/js/views/twofaccounts/Create.vue
deleted file mode 100644
index 0188d74c..00000000
--- a/resources/js/views/twofaccounts/Create.vue
+++ /dev/null
@@ -1,436 +0,0 @@
-
-
-
\ No newline at end of file
diff --git a/resources/js_vue3/components/VersionChecker.vue b/resources/js_vue3/components/VersionChecker.vue
deleted file mode 100644
index 6c3bc6ed..00000000
--- a/resources/js_vue3/components/VersionChecker.vue
+++ /dev/null
@@ -1,44 +0,0 @@
-
-
-
-
-
-
-
-
-
- {{ appSettings.latestRelease }} is available View on Github
-
-
- {{ $t('commons.you_are_up_to_date') }}
-
-
- {{ $t('errors.check_failed_try_later') }}
-
-
-
-
diff --git a/resources/js_vue3/components/formElements/FormErrors.js b/resources/js_vue3/components/formElements/FormErrors.js
deleted file mode 100644
index 12c1194f..00000000
--- a/resources/js_vue3/components/formElements/FormErrors.js
+++ /dev/null
@@ -1,141 +0,0 @@
-
-export default class Errors {
- /**
- * Create a new error bag instance.
- */
- constructor () {
- this.errors = {}
- }
-
- /**
- * Set the errors object or field error messages.
- *
- * @param {Object|String} field
- * @param {Array|String|undefined} messages
- */
- set (field, messages) {
- if (typeof field === 'object') {
- this.errors = field
- } else {
- this.set({ ...this.errors, [field]: arrayWrap(messages) })
- }
- }
-
- /**
- * Get all the errors.
- *
- * @return {Object}
- */
- all () {
- return this.errors
- }
-
- /**
- * Determine if there is an error for the given field.
- *
- * @param {String} field
- * @return {Boolean}
- */
- has (field) {
- return this.errors.hasOwnProperty(field)
- }
-
- /**
- * Determine if there are any errors for the given fields.
- *
- * @param {...String} fields
- * @return {Boolean}
- */
- hasAny (...fields) {
- return fields.some(field => this.has(field))
- }
-
- /**
- * Determine if there are any errors.
- *
- * @return {Boolean}
- */
- any () {
- return Object.keys(this.errors).length > 0
- }
-
- /**
- * Get the first error message for the given field.
- *
- * @param String} field
- * @return {String|undefined}
- */
- get (field) {
- if (this.has(field)) {
- return this.getAll(field)[0]
- }
- }
-
- /**
- * Get all the error messages for the given field.
- *
- * @param {String} field
- * @return {Array}
- */
- getAll (field) {
- return arrayWrap(this.errors[field] || [])
- }
-
- /**
- * Get the error message for the given fields.
- *
- * @param {...String} fields
- * @return {Array}
- */
- only (...fields) {
- const messages = []
-
- fields.forEach(field => {
- const message = this.get(field)
-
- if (message) {
- messages.push(message)
- }
- })
-
- return messages
- }
-
- /**
- * Get all the errors in a flat array.
- *
- * @return {Array}
- */
- flatten () {
- return Object.values(this.errors).reduce((a, b) => a.concat(b), [])
- }
-
- /**
- * Clear one or all error fields.
- *
- * @param {String|undefined} field
- */
- clear (field) {
- const errors = {}
-
- if (field) {
- Object.keys(this.errors).forEach(key => {
- if (key !== field) {
- errors[key] = this.errors[key]
- }
- })
- }
-
- this.set(errors)
- }
-}
-
-/**
- * If the given value is not an array, wrap it in one.
- *
- * @param {Any} value
- * @return {Array}
- */
-function arrayWrap (value) {
- return Array.isArray(value) ? value : [value]
-}
\ No newline at end of file
diff --git a/resources/js_vue3/services/webauthn/identifyAuthenticationError.js b/resources/js_vue3/services/webauthn/identifyAuthenticationError.js
deleted file mode 100644
index 5fe7f59c..00000000
--- a/resources/js_vue3/services/webauthn/identifyAuthenticationError.js
+++ /dev/null
@@ -1,95 +0,0 @@
-/**
- * MIT License
- *
- * Copyright (c) 2023 Bubka - https://github.com/Bubka/2FAuth
- * Copyright (c) 2020 Matthew Miller - https://github.com/MasterKale/SimpleWebAuthn
- *
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this software and associated documentation files (the "Software"), to deal
- * in the Software without restriction, including without limitation the rights
- * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
- * copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in all
- * copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
- * SOFTWARE.
- *
- */
-
-import { isValidDomain } from './isValidDomain';
-
-/**
- * Attempt to intuit _why_ an error was raised after calling `navigator.credentials.get()`
- */
-export function identifyAuthenticationError(error, options) {
- const { publicKey } = options;
-
- if (error.name === 'AbortError') {
- if (options.signal instanceof AbortSignal) {
- // Authentication ceremony was sent an abort signal
- // https://www.w3.org/TR/webauthn-2/#sctn-createCredential (Step 16)
-
- return {
- phrase: 'errors.aborted_by_user',
- type: 'is-warning'
- }
- }
-
- } else if (error.name === 'NotAllowedError') {
- /**
- * Pass the error directly through. Platforms are overloading this error beyond what the spec
- * defines and we don't want to overwrite potentially useful error messages.
- */
-
- return {
- phrase: 'errors.not_allowed_operation',
- type: 'is-danger'
- }
-
- } else if (error.name === 'SecurityError') {
-
- const effectiveDomain = window.location.hostname;
-
- if (!isValidDomain(effectiveDomain)) {
- // The current location domain is not a valid domain
- // https://www.w3.org/TR/webauthn-2/#sctn-discover-from-external-source (Step 5)
-
- return {
- phrase: 'errors.2fauth_has_not_a_valid_domain',
- type: 'is-danger'
- }
-
- } else if (publicKey.rpId !== effectiveDomain) {
- // The RP ID "${publicKey.rpId}" is invalid for this domain
- // // https://www.w3.org/TR/webauthn-2/#sctn-discover-from-external-source (Step 6)
-
- return {
- phrase: 'errors.security_error_check_rpid',
- type: 'is-danger'
- }
- }
-
- } else if (error.name === 'UnknownError') {
- // The authenticator was unable to process the specified options, or could not create a new assertion signature
- // https://www.w3.org/TR/webauthn-2/#sctn-op-get-assertion (Step 1)
- // https://www.w3.org/TR/webauthn-2/#sctn-op-get-assertion (Step 12)
-
- return {
- phrase: 'errors.unknown_error',
- type: 'is-danger'
- }
- }
-
- return {
- phrase: 'errors.unknown_error',
- type: 'is-danger'
- }
-}
\ No newline at end of file
diff --git a/resources/js_vue3/services/webauthn/identifyRegistrationError.js b/resources/js_vue3/services/webauthn/identifyRegistrationError.js
deleted file mode 100644
index f7691adb..00000000
--- a/resources/js_vue3/services/webauthn/identifyRegistrationError.js
+++ /dev/null
@@ -1,160 +0,0 @@
-/**
- * MIT License
- *
- * Copyright (c) 2023 Bubka - https://github.com/Bubka/2FAuth
- * Copyright (c) 2020 Matthew Miller - https://github.com/MasterKale/SimpleWebAuthn
- *
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this software and associated documentation files (the "Software"), to deal
- * in the Software without restriction, including without limitation the rights
- * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
- * copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in all
- * copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
- * SOFTWARE.
- *
- */
-
-import { isValidDomain } from './isValidDomain';
-
-/**
- * Attempt to intuit _why_ an error was raised after calling `navigator.credentials.create()`
- */
-export function identifyRegistrationError(error, options) {
- const { publicKey } = options;
-
- if (error.name === 'AbortError') {
- if (options.signal instanceof AbortSignal) {
- // Registration ceremony was sent an abort signal
- // https://www.w3.org/TR/webauthn-2/#sctn-createCredential (Step 16)
-
- return {
- phrase: 'errors.aborted_by_user',
- type: 'is-warning'
- }
- }
-
- } else if (error.name === 'ConstraintError') {
- if (publicKey.authenticatorSelection?.requireResidentKey === true) {
- // Discoverable credentials were required but no available authenticator supported it
- // https://www.w3.org/TR/webauthn-2/#sctn-op-make-cred (Step 4)
-
- return {
- phrase: 'errors.authenticator_missing_discoverable_credential_support',
- type: 'is-danger'
- }
-
- } else if (publicKey.authenticatorSelection?.userVerification === 'required') {
- // User verification was required but no available authenticator supported it
- // https://www.w3.org/TR/webauthn-2/#sctn-op-make-cred (Step 5)
-
- return {
- phrase: 'errors.authenticator_missing_user_verification_support',
- type: 'is-danger'
- }
- }
-
- } else if (error.name === 'InvalidStateError') {
- // The authenticator was previously registered
- // https://www.w3.org/TR/webauthn-2/#sctn-createCredential (Step 20)
- // https://www.w3.org/TR/webauthn-2/#sctn-op-make-cred (Step 3)
-
- return {
- phrase: 'errors.security_device_already_registered',
- type: 'is-danger'
- }
-
- } else if (error.name === 'NotAllowedError') {
- /**
- * Pass the error directly through. Platforms are overloading this error beyond what the spec
- * defines and we don't want to overwrite potentially useful error messages.
- */
-
- return {
- phrase: 'errors.not_allowed_operation',
- type: 'is-danger'
- }
-
- } else if (error.name === 'NotSupportedError') {
-
- const validPubKeyCredParams = publicKey.pubKeyCredParams.filter(
- (param) => param.type === 'public-key',
- );
-
- if (validPubKeyCredParams.length === 0) {
- // No entry in pubKeyCredParams was of type "public-key"
- // https://www.w3.org/TR/webauthn-2/#sctn-createCredential (Step 10)
-
- return {
- phrase: 'errors.no_entry_was_of_type_public_key',
- type: 'is-danger'
- }
- }
-
- // No available authenticator supported any of the specified pubKeyCredParams algorithms
- // https://www.w3.org/TR/webauthn-2/#sctn-op-make-cred (Step 2)
-
- return {
- phrase: 'errors.no_authenticator_support_specified_algorithms',
- type: 'is-danger'
- }
-
- } else if (error.name === 'SecurityError') {
-
- const effectiveDomain = window.location.hostname;
-
- if (!isValidDomain(effectiveDomain)) {
- // The current location domain is not a valid domain
- // https://www.w3.org/TR/webauthn-2/#sctn-createCredential (Step 7)
-
- return {
- phrase: 'errors.2fauth_has_not_a_valid_domain',
- type: 'is-danger'
- }
-
- } else if (publicKey.rp.id !== effectiveDomain) {
- // The RP ID "${publicKey.rp.id}" is invalid for this domain
- // https://www.w3.org/TR/webauthn-2/#sctn-createCredential (Step 8)
-
- return {
- phrase: 'errors.security_error_check_rpid',
- type: 'is-danger'
- }
- }
-
- } else if (error.name === 'TypeError') {
- if (publicKey.user.id.byteLength < 1 || publicKey.user.id.byteLength > 64) {
- // User ID was not between 1 and 64 characters
- // https://www.w3.org/TR/webauthn-2/#sctn-createCredential (Step 5)
-
- return {
- phrase: 'errors.user_id_not_between_1_64',
- type: 'is-danger'
- }
- }
-
- } else if (error.name === 'UnknownError') {
- // The authenticator was unable to process the specified options, or could not create a new credential
- // https://www.w3.org/TR/webauthn-2/#sctn-op-make-cred (Step 1)
- // https://www.w3.org/TR/webauthn-2/#sctn-op-make-cred (Step 8)
-
- return {
- phrase: 'errors.unknown_error',
- type: 'is-danger'
- }
- }
-
- return {
- phrase: 'errors.unknown_error',
- type: 'is-danger'
- }
-}
diff --git a/resources/js_vue3/services/webauthn/isValidDomain.js b/resources/js_vue3/services/webauthn/isValidDomain.js
deleted file mode 100644
index b02e8522..00000000
--- a/resources/js_vue3/services/webauthn/isValidDomain.js
+++ /dev/null
@@ -1,15 +0,0 @@
-/**
- * A simple test to determine if a hostname is a properly-formatted domain name
- *
- * A "valid domain" is defined here: https://url.spec.whatwg.org/#valid-domain
- *
- * Regex sourced from here:
- * https://www.oreilly.com/library/view/regular-expressions-cookbook/9781449327453/ch08s15.html
- */
-export function isValidDomain(hostname) {
- return (
- // Consider localhost valid as well since it's okay wrt Secure Contexts
- hostname === 'localhost' ||
- /^([a-z0-9]+(-[a-z0-9]+)*\.)+[a-z]{2,}$/i.test(hostname)
- );
-}
\ No newline at end of file
diff --git a/resources/js_vue3/services/webauthn/webauthnAbortService.js b/resources/js_vue3/services/webauthn/webauthnAbortService.js
deleted file mode 100644
index b8aa9ad0..00000000
--- a/resources/js_vue3/services/webauthn/webauthnAbortService.js
+++ /dev/null
@@ -1,51 +0,0 @@
-/**
- * MIT License
- *
- * Copyright (c) 2020 Matthew Miller - https://github.com/MasterKale/SimpleWebAuthn
- *
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this software and associated documentation files (the "Software"), to deal
- * in the Software without restriction, including without limitation the rights
- * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
- * copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in all
- * copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
- * SOFTWARE.
- *
- * A way to cancel an existing WebAuthn request, for example to cancel a
- * WebAuthn autofill authentication request for a manual authentication attempt.
- */
-class WebauthnAbortService {
- controller;
-
- /**
- * Prepare an abort signal that will help support multiple auth attempts without needing to
- * reload the page
- */
- createNewAbortSignal() {
- // Abort any existing calls to navigator.credentials.create() or navigator.credentials.get()
- if (this.controller) {
- const abortError = new Error(
- 'Cancelling existing WebAuthn API call for new one',
- );
- abortError.name = 'AbortError';
- this.controller.abort(abortError);
- }
-
- const newController = new AbortController();
-
- this.controller = newController;
- return newController.signal;
- }
-}
-
-export const webauthnAbortService = new WebauthnAbortService();
\ No newline at end of file
diff --git a/resources/js_vue3/views/About.vue b/resources/js_vue3/views/About.vue
deleted file mode 100644
index ec3b514d..00000000
--- a/resources/js_vue3/views/About.vue
+++ /dev/null
@@ -1,138 +0,0 @@
-
-
-
-
-