Browse Source

Look in .own.did for DID, as well

pull/135/head
Jose Olarte III 1 week ago
parent
commit
cbc14e21ec
  1. 7
      src/views/ContactQRScanFullView.vue
  2. 7
      src/views/ContactQRScanShowView.vue

7
src/views/ContactQRScanFullView.vue

@ -357,8 +357,9 @@ export default class ContactQRScan extends Vue {
}
const contactInfo = decodedJwt.payload.own;
if (!decodedJwt.payload.iss) {
logger.warn("Invalid JWT payload - missing 'iss' field");
const did = contactInfo.did || decodedJwt.payload.iss;
if (!did) {
logger.warn("Invalid contact info - missing DID");
this.$notify({
group: "alert",
type: "danger",
@ -370,7 +371,7 @@ export default class ContactQRScan extends Vue {
// Create contact object
const contact = {
did: decodedJwt.payload.iss,
did: did,
name: contactInfo.name || "",
email: contactInfo.email || "",
phone: contactInfo.phone || "",

7
src/views/ContactQRScanShowView.vue

@ -483,8 +483,9 @@ export default class ContactQRScanShow extends Vue {
}
const contactInfo = decodedJwt.payload.own;
if (!decodedJwt.payload.iss) {
logger.warn("Invalid JWT payload - missing 'iss' field");
const did = contactInfo.did || decodedJwt.payload.iss;
if (!did) {
logger.warn("Invalid contact info - missing DID");
this.$notify({
group: "alert",
type: "danger",
@ -496,7 +497,7 @@ export default class ContactQRScanShow extends Vue {
// Create contact object
const contact = {
did: decodedJwt.payload.iss,
did: did,
name: contactInfo.name || "",
email: contactInfo.email || "",
phone: contactInfo.phone || "",

Loading…
Cancel
Save