duo-labs / py_webauthn

Pythonic WebAuthn 🐍
https://duo-labs.github.io/py_webauthn
BSD 3-Clause "New" or "Revised" License
856 stars 171 forks source link

Flask demo client-side js #68

Closed gradyy closed 3 years ago

gradyy commented 4 years ago

getCredentialCreateOptionsFromServer and getCredentialRequestOptionsFromServer differ only by a hardcoded url. The same applies to postAssertionToServer and postNewAssertionToServer. These functions can be consolidated into functions that takes the url as a parameter.

This change is to improve readability. The destination urls have been moved to the main body of didClickRegister and didClickLogin to help the reader more easily identify the server-side function being invoked at each step of the registration or authentication process. In short, the information is all in one place. Having less code to review should also be a plus for the readability factor.

A future improvement may be to use Flask templating and url_for to insert the appropriate urls at runtime.

commits prior to da4a230 are duplicated from #67

gradyy commented 4 years ago

one commit duplicated from #73 removed unused copy of JQuery.

CLAassistant commented 3 years ago

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.
You have signed the CLA already but the status is still pending? Let us recheck it.