mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-09-09 05:33:11 -04:00
Avoid registering the same authenticator twice
This passes existing credentials in the server response, to allow the browser to prevent re-registering the same key for the same user. Registering the same key multiple times doesn't seem to be an issue technically; the user has likely got their keys mixed up. - Chrome says "you don't need to register it again". - Safari exits with an InvalidStateError. - Firefox exits with a DOMException.
This commit is contained in:
@@ -4485,7 +4485,7 @@ def mock_get_invited_org_user_by_id(mocker, sample_org_invite):
|
||||
def webauthn_credential():
|
||||
return {
|
||||
'name': 'Test credential',
|
||||
'credential_data': 'credential_data',
|
||||
'credential_data': b'WJ0AAAAAAAAAAAAAAAAAAAAAAECKU1ppjl9gmhHWyDkgHsUvZmhr6oF3/lD3llzLE2SaOSgOGIsIuAQqgp8JQSUu3r/oOaP8RS44dlQjrH+ALfYtpAECAyYhWCAxnqAfESXOYjKUc2WACuXZ3ch0JHxV0VFrrTyjyjIHXCJYIFnx8H87L4bApR4M+hPcV+fHehEOeW+KCyd0H+WGY8s6', # noqa
|
||||
'registration_response': 'anything',
|
||||
'created_at': '2017-10-18T16:57:14.154185Z',
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user