Merge pull request #3909 from alphagov/security-key-flash

Add a success message when security key registered
This commit is contained in:
Chris Hill-Scott
2021-06-03 14:12:55 +01:00
committed by GitHub
2 changed files with 9 additions and 0 deletions

View File

@@ -55,6 +55,11 @@ def webauthn_complete_register():
current_user.id, credential
)
flash((
'Registration complete. Next time you sign in to Notify '
'youll be asked to use your security key.'
), 'default_with_tick')
return cbor.encode('')

View File

@@ -153,6 +153,10 @@ def test_complete_register_clears_session(
with platform_admin_client.session_transaction() as session:
assert 'webauthn_registration_state' not in session
assert session['_flashes'] == [('default_with_tick', (
'Registration complete. Next time you sign in to Notify '
'youll be asked to use your security key.'
))]
def test_complete_register_handles_library_errors(