04/16 Upload codebase
This commit is contained in:
@@ -0,0 +1,72 @@
|
||||
{% extends "base.html" %}
|
||||
{% block title %}Sign In — PassKeeper{% endblock %}
|
||||
{% block body_class %}auth-page{% endblock %}
|
||||
|
||||
{% block body %}
|
||||
<div class="auth-container">
|
||||
<div class="auth-card">
|
||||
<div class="auth-logo">
|
||||
<span class="logo-icon">🔒</span>
|
||||
<span class="logo-text">PassKeeper</span>
|
||||
</div>
|
||||
|
||||
<p id="register-notice" class="notice-success hidden">
|
||||
Account created! Please sign in.
|
||||
</p>
|
||||
|
||||
<!-- Step 1: Email + Master Password -->
|
||||
<div id="login-step-1">
|
||||
<h1 class="auth-title">Sign in</h1>
|
||||
<form id="login-form" novalidate>
|
||||
<div class="form-group">
|
||||
<label for="email">Email address</label>
|
||||
<input type="email" id="email" name="email" required
|
||||
autocomplete="email" placeholder="you@example.com">
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="password">Master password</label>
|
||||
<div class="input-with-toggle">
|
||||
<input type="password" id="password" name="password" required
|
||||
autocomplete="current-password" placeholder="Enter master password">
|
||||
<button type="button" class="btn-show-pass" id="toggle-login-pass"
|
||||
aria-label="Toggle password visibility">👁</button>
|
||||
</div>
|
||||
</div>
|
||||
<button type="submit" class="btn-primary btn-full" data-loading-text="Verifying…">
|
||||
Sign in
|
||||
</button>
|
||||
</form>
|
||||
<p class="auth-footer">
|
||||
Don't have an account? <a href="/register">Create one</a>
|
||||
</p>
|
||||
</div>
|
||||
|
||||
<!-- Step 2: TOTP verification (hidden until MFA required) -->
|
||||
<div id="login-step-2" class="hidden">
|
||||
<h1 class="auth-title">Two-factor authentication</h1>
|
||||
<p class="auth-step-hint">Enter the 6-digit code from your authenticator app.</p>
|
||||
<form id="mfa-form" novalidate>
|
||||
<p id="mfa-error" class="form-error hidden">Invalid or expired code. Try again.</p>
|
||||
<div class="form-group">
|
||||
<label for="mfa-code">Authenticator code</label>
|
||||
<input type="text" id="mfa-code" name="mfa_code"
|
||||
inputmode="numeric" pattern="[0-9]{6}" maxlength="6"
|
||||
autocomplete="one-time-code" placeholder="000000">
|
||||
</div>
|
||||
<button type="submit" class="btn-primary btn-full" data-loading-text="Verifying…">
|
||||
Verify
|
||||
</button>
|
||||
</form>
|
||||
<div class="auth-footer">
|
||||
<button class="btn-text" id="btn-back-to-password">← Back to sign in</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
{% endblock %}
|
||||
|
||||
{% block scripts %}
|
||||
<script src="{{ url_for('static', filename='js/crypto.js') }}"></script>
|
||||
<script src="{{ url_for('static', filename='js/auth.js') }}"></script>
|
||||
{% endblock %}
|
||||
@@ -0,0 +1,55 @@
|
||||
{% extends "base.html" %}
|
||||
{% block title %}Create Account — PassKeeper{% endblock %}
|
||||
{% block body_class %}auth-page{% endblock %}
|
||||
|
||||
{% block body %}
|
||||
<div class="auth-container">
|
||||
<div class="auth-card">
|
||||
<div class="auth-logo">
|
||||
<span class="logo-icon">🔒</span>
|
||||
<span class="logo-text">PassKeeper</span>
|
||||
</div>
|
||||
|
||||
<h1 class="auth-title">Create account</h1>
|
||||
|
||||
<div class="notice-info">
|
||||
<strong>Important:</strong> Your master password encrypts all your data.
|
||||
It is <em>never sent to our servers</em>. If you forget it, your vault cannot be recovered.
|
||||
</div>
|
||||
|
||||
<form id="register-form" novalidate>
|
||||
<div class="form-group">
|
||||
<label for="email">Email address</label>
|
||||
<input type="email" id="email" name="email" required
|
||||
autocomplete="email" placeholder="you@example.com">
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="password">Master password <span class="hint">(min. 12 characters)</span></label>
|
||||
<div class="input-with-toggle">
|
||||
<input type="password" id="password" name="password" required
|
||||
autocomplete="new-password" minlength="12" placeholder="Create a strong master password">
|
||||
<button type="button" class="btn-show-pass" id="toggle-reg-pass" aria-label="Toggle password visibility">👁</button>
|
||||
</div>
|
||||
<div class="password-strength" id="strength-bar"></div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="confirm_password">Confirm master password</label>
|
||||
<input type="password" id="confirm_password" name="confirm_password" required
|
||||
autocomplete="new-password" placeholder="Repeat master password">
|
||||
</div>
|
||||
<button type="submit" class="btn-primary btn-full" data-loading-text="Creating account…">
|
||||
Create account
|
||||
</button>
|
||||
</form>
|
||||
|
||||
<p class="auth-footer">
|
||||
Already have an account? <a href="/login">Sign in</a>
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
{% endblock %}
|
||||
|
||||
{% block scripts %}
|
||||
<script src="{{ url_for('static', filename='js/crypto.js') }}"></script>
|
||||
<script src="{{ url_for('static', filename='js/auth.js') }}"></script>
|
||||
{% endblock %}
|
||||
Reference in New Issue
Block a user