Browse Source

Look for DID in .iss field instead of .own.did

pull/135/head
Jose Olarte III 6 days ago
parent
commit
3e02b3924a
  1. 6
      src/views/ContactQRScanFullView.vue
  2. 6
      src/views/ContactQRScanShowView.vue

6
src/views/ContactQRScanFullView.vue

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

6
src/views/ContactQRScanShowView.vue

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

Loading…
Cancel
Save