Generate a QR code for apps to scan

This commit is contained in:
Travis Ralston 2020-01-23 20:05:32 -07:00
parent 586a240e41
commit b682e7d908
2 changed files with 21 additions and 19 deletions

View file

@ -24,15 +24,13 @@ import QRCode from "qrcode-react";
export default class VerificationQRCode extends React.PureComponent {
static propTypes = {
// Common for all kinds of QR codes
keys: PropTypes.array.isRequired, // array of [Key ID, Key] pairs
keys: PropTypes.array.isRequired, // array of [Key ID, Base64 Key] pairs
action: PropTypes.string.isRequired,
keyholderUserId: PropTypes.string.isRequired,
// User verification use case only
secret: PropTypes.string,
otherUserKey: PropTypes.string,
verificationKey: PropTypes.string,
verificationAlgorithms: PropTypes.array,
otherUserKey: PropTypes.string, // Base64 key being verified
requestEventId: PropTypes.string,
};
@ -44,8 +42,6 @@ export default class VerificationQRCode extends React.PureComponent {
const query = {
request: this.props.requestEventId,
action: this.props.action,
verification_algorithms: this.props.verificationAlgorithms,
verification_key: this.props.verificationKey,
other_user_key: this.props.otherUserKey,
};
for (const key of this.props.keys) {