Changeset View
Changeset View
Standalone View
Standalone View
web/cashtab/src/hooks/useWebAuthentication.js
Show First 20 Lines • Show All 88 Lines • ▼ Show 20 Lines | useEffect(async () => { | ||||
handleDocVisibilityChange, | handleDocVisibilityChange, | ||||
); | ); | ||||
}; | }; | ||||
} | } | ||||
}, []); | }, []); | ||||
// save the config whenever it is changed | // save the config whenever it is changed | ||||
useEffect(async () => { | useEffect(async () => { | ||||
if (isAuthenticationRequired === undefined) return; | if (typeof isAuthenticationRequired === 'undefined') return; | ||||
await saveAuthenticationConfigToLocalStorage(); | await saveAuthenticationConfigToLocalStorage(); | ||||
}, [isAuthenticationRequired, credentialId]); | }, [isAuthenticationRequired, credentialId]); | ||||
// options for PublicKeyCredentialCreation | // options for PublicKeyCredentialCreation | ||||
const publicKeyCredentialCreationOptions = { | const publicKeyCredentialCreationOptions = { | ||||
// hardcode for now | // hardcode for now | ||||
// consider generating random string and then verifying it against the reponse from authenticator | // consider generating random string and then verifying it against the reponse from authenticator | ||||
challenge: Uint8Array.from('cashtab-wallet-for-ecash', c => | challenge: Uint8Array.from('cashtab-wallet-for-ecash', c => | ||||
▲ Show 20 Lines • Show All 135 Lines • Show Last 20 Lines |