{t(strings, "confirm_password_help")}
+ + + + {can_use_passkeys && urls["passkey.confirm-options"] && urls["passkey.confirm"] ? ( +{t(strings, "forgot_password_help")}
+ ++ {t(strings, "no_account")}{" "} + + {t(strings, "sign_up")} + +
+ ) : null} +{t(strings, "password_update_required")}
+ + +{t(strings, "verify_email_help", { email })}
+ +
+ {plainTextToken}
+
+ + {error} +
+ ) : null} +{t(strings, "passkeys_help")}
+ + {passkeys.length ? ( +{t(strings, "no_passkeys")}
+ )} + + {urls["passkey.registration-options"] && urls["passkey.store"] ? ( +{t(strings, "browser_sessions_help")}
+{t(strings, "two_factor_scan")}
+
+ {t(strings, "setup_key")}:{" "}
+
+ {state.secret_key}
+
+
{state.required ? t(strings, "two_factor_required") : t(strings, "two_factor_offer")}
+ + > + ) : null} + + {state.recovery_codes ? ( +{t(strings, "recovery_codes_help")}
+{{ __('This is a secure area. Please confirm your password before continuing.') }}
+ +{{ __('Enter your email address and we will email you a link to choose a new password.') }}
+ + @include('auth::partials.status') + ++ {{ __("Don't have an account?") }} + {{ __('Sign up') }} +
+ @endif ++ {{ __('Already have an account?') }} + {{ __('Log in') }} +
+{{ session('plain_text_token') }}
+ {{ __('Log in with your fingerprint, face or screen lock instead of a password.') }}
+ + @if($passkeys) +{{ __('You have no passkeys yet.') }}
+ @endif + +{{ __('The browsers and devices where you are logged in.') }}
+ +{{ __('Scan the QR code with your authenticator app, then enter the code it shows.') }}
+ +
+ {{ __('Setup key') }}:
+ {{ $two_factor['secret_key'] }}
+
+ @if($two_factor['required']) + {{ __('Your account needs two-factor authentication. Set it up to continue.') }} + @else + {{ __('Add a second step to your login with a code from an authenticator app.') }} + @endif +
+ +{{ __('Store these recovery codes somewhere safe. Each can be used once if you lose your authenticator app.') }}
+{{ __('Once your account is deleted, all of its data is permanently deleted. Enter your password to confirm.') }}
+ +{{ __('Enter the code from your authenticator app.') }}
+ +{{ __('You need to choose a new password before you continue.') }}
+ +{{ __('We have emailed a verification link to :email. Click the link to verify your email address.', ['email' => $email]) }}
+ + @include('auth::partials.status') + +mobile number page
+@endsection diff --git a/tsconfig.json b/tsconfig.json new file mode 100644 index 0000000..06de328 --- /dev/null +++ b/tsconfig.json @@ -0,0 +1,34 @@ +{ + "compilerOptions": { + "target": "ES2022", + "module": "ESNext", + "moduleResolution": "Bundler", + "jsx": "react-jsx", + "strict": true, + "noUncheckedIndexedAccess": true, + "skipLibCheck": true, + "esModuleInterop": true, + "isolatedModules": true, + "lib": [ + "ES2022", + "DOM", + "DOM.Iterable" + ], + "types": [ + "vitest/globals" + ], + "paths": { + "@javaabu/auth": [ + "./resources/js" + ], + "@javaabu/auth/*": [ + "./resources/js/*" + ] + }, + "resolveJsonModule": true + }, + "include": [ + "resources/js", + "tests/js" + ] +} diff --git a/vitest.config.ts b/vitest.config.ts new file mode 100644 index 0000000..df33abf --- /dev/null +++ b/vitest.config.ts @@ -0,0 +1,10 @@ +import { defineConfig } from "vitest/config"; + +export default defineConfig({ + test: { + environment: "jsdom", + globals: true, + include: ["tests/js/**/*.test.{ts,tsx}"], + setupFiles: ["tests/js/setup.ts"], + }, +});