-
Notifications
You must be signed in to change notification settings - Fork 2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Use dapp identity key with aud, per spec #40
Use dapp identity key with aud, per spec #40
Conversation
74e5dfd
to
1addad2
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great catch thank you 🙏 not quite ready to merge yet
@@ -237,7 +237,7 @@ export class NotifyClient extends INotifyClient { | |||
if (existingSubExists) return; | |||
|
|||
this.messages.set(subTopic, { topic: subTopic, messages: [] }); | |||
this.core.crypto.setSymKey(subscription.symKey).then(() => { | |||
this.core.crypto.setSymKey(subscription.symKey, subTopic).then(() => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this related/still wanted?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes - doesn't hurt to have it
ksu: this.client.keyserverUrl, | ||
scp, | ||
act: "notify_subscription", | ||
app: metadata.url, | ||
}; | ||
|
||
console.log( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Debug log
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Keeping logs for now as they're needed for testing
@@ -429,8 +437,19 @@ export class NotifyEngine extends INotifyEngine { | |||
async (event: RelayerTypes.MessageEvent) => { | |||
const { topic, message, publishedAt } = event; | |||
|
|||
console.log( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Debug log
const payload = await this.client.core.crypto.decode(topic, message); | ||
|
||
console.log("Decoded: ", payload); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Debug log
Co-authored-by: Ben Kremer <ben@walletconnect.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Build is failing bc the method callsites need to be updated still to the proper naming
Per spec: https://specs.walletconnect.com/2.0/specs/clients/notify/notify-authentication#notify-subscription
We were using dapp url as
aud
in all JWTs, when it should be dapp identity key.The reason this worked so far is because the
aud
field was not validated yet