Stormbase / django-otp-webauthn

Passkey support for Django. Currently in early stages of development and not ready for production use!
BSD 3-Clause "New" or "Revised" License
10 stars 2 forks source link

Change `credential_id_sha256` data type for MySQL compatibility #18

Closed Stormheg closed 1 month ago

Stormheg commented 1 month ago

Fixes https://github.com/Stormbase/django-otp-webauthn/issues/17

MySQL has issues creating an index on binary field, requiring additional instructions for it to work. I feel it is better to go with a slightly more compatible implementation that utilizes plain CharField than to write special 'edge-case' instructions just for MySQL.

Squashed migration necessary to avoid ever executing migration code that crashes on MySQL.

@nijel could you please give this PR a try and see if it resolves your issue? I think you will like it!

nijel commented 1 month ago

Thanks, this seems to work just fine in our CI for both MySQL and PostgreSQL: https://github.com/WeblateOrg/weblate/actions/runs/10217762479/job/28272321602?pr=12173