justinmayer / kagi

WebAuthn security keys and TOTP multi-factor authentication for Django
BSD 2-Clause "Simplified" License
92 stars 11 forks source link

Pros and Cons of begin-activate and begin-assertion calls rather than embedded JSON in the template #7

Closed Natim closed 5 years ago

Natim commented 5 years ago

django_u2f was embedding the JSON payload to initiate the connection within the HTML of the login form.

When we switched the webauthn, we decided to go with an API call that return a JSON response with the payload.

The main drawback is to have this API call, one more request. The benefit are multiple:

I wanted to document the discussion we had about that explaining why we chose to go with this new strategy rather than the one previously picked by django_u2f.

Natim commented 5 years ago

Also this helps to handle multiple keys.