File tree Expand file tree Collapse file tree 1 file changed +15
-1
lines changed
Expand file tree Collapse file tree 1 file changed +15
-1
lines changed Original file line number Diff line number Diff line change @@ -298,7 +298,21 @@ async function createOrReplacePublicKey(event) {
298298 // excludeCredentials: [ { type: 'public-key', id: 'base64id' }]
299299 pubkeyRegOpts . publicKey . excludeCredentials = [ ] ;
300300
301- await setPasskey ( pubkeyRegOpts ) . catch ( catchUiError ) ;
301+ if ( currentMediation === "conditional" ) {
302+ // by selecting explicit register we're canceling the
303+ // conditional state and should trigger the UI to update to match
304+ let $mediation = $ ( 'select[name="mediation"]' ) ;
305+ //@ts -ignore
306+ $mediation . value = "optional" ;
307+ //@ts -ignore
308+ $mediation . onchange ( ) ;
309+ }
310+ await setPasskey ( pubkeyRegOpts )
311+ . then ( function ( ) {
312+ //@ts -ignore
313+ $ ( "input[name=username]" ) . value = "" ;
314+ } )
315+ . catch ( catchUiError ) ;
302316}
303317
304318/**
You can’t perform that action at this time.
0 commit comments