Details
Logged the URL being encoded into the QR code, and parsed out the keys to make sure they were correct
const url = 'comm://qr-code/%7B%22aes256%22%3A%22b7990e4614f46bd8958df23c5c799110fdef8bc29a9a8821de60aad9e9e72c7f%22%2C%22ed25519%22%3A%22dbe%2FGygnpkyvW0GVMqwLuaiWAL6F9yoAwS3FO2BMhls%22%7D'; const qrCodeKeysRegex = /qr-code\/(\S+)$/; const qrCodeKeysMatch = qrCodeKeysRegex.exec(url)[1]; const keys = JSON.parse(decodeURIComponent(qrCodeKeysMatch)); console.log(keys);
Output:
{ aes256: 'b7990e4614f46bd8958df23c5c799110fdef8bc29a9a8821de60aad9e9e72c7f', ed25519: 'dbe/GygnpkyvW0GVMqwLuaiWAL6F9yoAwS3FO2BMhls' }
Diff Detail
- Repository
- rCOMM Comm
- Branch
- terminal_qr
- Lint
No Lint Coverage - Unit
No Test Coverage
Event Timeline
accepting with nit inline
web/account/qr-code-login.react.js | ||
---|---|---|
25–26 | i think we can name these better. maybe rawAESKey and aesKeyAsHexString. open to alternatives, just don't love calling the Uint8Array version of the key aes256 same in native |
I thought putting an invariant here was a reasonable trade-off vs. refactoring the types in the fullStateSyncActionType payload (specifically StateSyncFullActionPayload which is derived from ClientFullStateSync which is derived from BaseFullStateSync) which are used across clients and keyserver.
Open to re-exploring if that would be preferred.