✨ Closing #104
This commit is contained in:
@@ -99,7 +99,11 @@ def verify_webauthn(data, fidocredentialss: list[FidoCredentials], login_session
|
|||||||
|
|
||||||
@router.post("/start")
|
@router.post("/start")
|
||||||
async def start_login(data: StartLoginInput):
|
async def start_login(data: StartLoginInput):
|
||||||
user = await User.objects.select_related("fidocredentialss").get_or_none(email=data.email)
|
user = (
|
||||||
|
await User.objects.select_related("fidocredentialss")
|
||||||
|
.filter((User.email == data.email) | (User.username == data.email))
|
||||||
|
.get_or_none()
|
||||||
|
)
|
||||||
step_1: set[StartLoginResponseTypes] = set()
|
step_1: set[StartLoginResponseTypes] = set()
|
||||||
step_2: set[StartLoginResponseTypes] = set()
|
step_2: set[StartLoginResponseTypes] = set()
|
||||||
webauthn_data = None
|
webauthn_data = None
|
||||||
|
|||||||
@@ -75,6 +75,7 @@
|
|||||||
"welcome_back": "Welcome back.",
|
"welcome_back": "Welcome back.",
|
||||||
"login_or_create_account": "Log in or create an account",
|
"login_or_create_account": "Log in or create an account",
|
||||||
"already_have_account": "Don't have an account?",
|
"already_have_account": "Don't have an account?",
|
||||||
|
"email_or_username": "Email or Username",
|
||||||
"modal": {
|
"modal": {
|
||||||
"success": {
|
"success": {
|
||||||
"success_check_mail": "Logged in. Check your e-mail inbox.",
|
"success_check_mail": "Logged in. Check your e-mail inbox.",
|
||||||
|
|||||||
@@ -86,7 +86,7 @@
|
|||||||
{/if}
|
{/if}
|
||||||
|
|
||||||
<div
|
<div
|
||||||
class="lg:w-1/3 max-w-sm mx-auto overflow-hidden bg-white rounded-lg shadow-md dark:bg-gray-800"
|
class="lg:w-1/3 max-w-sm mx-auto overflow-hidden bg-white rounded-lg shadow-2xl dark:bg-gray-800"
|
||||||
>
|
>
|
||||||
{#if step === 0}
|
{#if step === 0}
|
||||||
<!-- <p>StartWindow</p>-->
|
<!-- <p>StartWindow</p>-->
|
||||||
|
|||||||
@@ -52,16 +52,16 @@
|
|||||||
id="email"
|
id="email"
|
||||||
bind:value={email}
|
bind:value={email}
|
||||||
name="email"
|
name="email"
|
||||||
type="email"
|
type="text"
|
||||||
class="w-full peer bg-transparent h-10 rounded-lg text-gray-700 dark:text-white placeholder-transparent ring-2 px-2 ring-gray-500 focus:ring-sky-600 focus:outline-none focus:border-rose-600"
|
class="w-full peer bg-transparent h-10 rounded-lg text-gray-700 dark:text-white placeholder-transparent ring-2 px-2 ring-gray-500 focus:ring-sky-600 focus:outline-none focus:border-rose-600"
|
||||||
placeholder={$t('words.email')}
|
placeholder={$t('login_page.email_or_username')}
|
||||||
autocomplete="email"
|
autocomplete="email"
|
||||||
/>
|
/>
|
||||||
<label
|
<label
|
||||||
for="email"
|
for="email"
|
||||||
class="absolute cursor-text left-0 -top-3 text-sm text-gray-700 dark:text-white bg-inherit mx-1 px-1 peer-placeholder-shown:text-base peer-placeholder-shown:text-gray-500 peer-placeholder-shown:top-2 peer-focus:-top-3 peer-focus:text-sky-600 peer-focus:text-sm transition-all"
|
class="absolute cursor-text left-0 -top-3 text-sm text-gray-700 dark:text-white bg-inherit mx-1 px-1 peer-placeholder-shown:text-base peer-placeholder-shown:text-gray-500 peer-placeholder-shown:top-2 peer-focus:-top-3 peer-focus:text-sky-600 peer-focus:text-sm transition-all"
|
||||||
>
|
>
|
||||||
{$t('words.email')}
|
{$t('login_page.email_or_username')}
|
||||||
</label>
|
</label>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
Reference in New Issue
Block a user