diff --git a/flake.nix b/flake.nix index 7ae19e6..f0e0199 100644 --- a/flake.nix +++ b/flake.nix @@ -58,7 +58,7 @@ settings = { HYDRA_ADMIN_URL = "http://127.0.0.1:8081"; HYDRA_PUBLIC_URL = "http://127.0.0.1:8082"; - PUBLIC_URL = "http://127.0.0.1:5000"; + PUBLIC_URL = "http://localhost:5000"; ADMINS = [ "tuxcoder" ]; }; }; diff --git a/lenticular_cloud/template/frontend/passkey_new.html.j2 b/lenticular_cloud/template/frontend/passkey_new.html.j2 index d8abbb6..c0107ef 100644 --- a/lenticular_cloud/template/frontend/passkey_new.html.j2 +++ b/lenticular_cloud/template/frontend/passkey_new.html.j2 @@ -43,9 +43,9 @@
To register new credential:
    -
  1. Insert/connect authenticator and verify user presence.
  2. Set name for the new credential.
  3. Submit the registration.
  4. +
  5. Insert/connect authenticator and verify user presence.
diff --git a/lenticular_cloud/views/frontend.py b/lenticular_cloud/views/frontend.py index 676eb44..cfdba60 100644 --- a/lenticular_cloud/views/frontend.py +++ b/lenticular_cloud/views/frontend.py @@ -196,8 +196,12 @@ def app_token_delete(app_token_name: str) -> ResponseReturnValue: def passkey() -> ResponseReturnValue: """list registered credentials for current user""" - credentials = PasskeyCredential.query.all() - return render_template('frontend/passkey_list.html.j2', credentials=credentials, button_form=ButtonForm()) + user = get_current_user() + return render_template( + 'frontend/passkey_list.html.j2', + credentials=user.passkey_credentials, + button_form=ButtonForm() + ) @@ -205,9 +209,8 @@ def passkey() -> ResponseReturnValue: def passkey_new() -> ResponseReturnValue: """register credential for current user""" public_url = urlparse(current_app.config['PUBLIC_URL']) - - user = get_current_user() # type: User + user = get_current_user() form = PasskeyRegisterForm() options = webauthn.generate_registration_options(