-
Notifications
You must be signed in to change notification settings - Fork 410
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
[Spec] Auth Multi Account #355
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
|
||
// request wallet authentication | ||
public abstract request(params: RequestParams, topic: string ): Promise<{ uri, id }>; | ||
|
||
// respond wallet authentication | ||
public abstract respond(params: RespondParams): Promise<boolean>; | ||
public abstract respond(params: RespondParams, account: Account): Promise<boolean>; |
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.
What is the Account made of?
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.
Account removed from sdk initializer and moved here. We can call it iss
. Account
object is a wrapper around CAIP-10 string
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.
I suggest not changing the name and sticking to the iss
. In general, not all sdks introduced the Account
so from the spec perspective it's more readable having iss
|
If payload chainId is invalid string we returns nil |
@jakobuid @flypaper0 this would be an internal util though wouldn't it, not part of the public API? Is there a case where this needs to be called from the top-level by an implementing dev? EDIT: ah hold on I see now, so it gets bubbled up to top level via So yeah on board with Jakob's proposal to just make this part of the public API then rather than an appendix util. |
Yup, because we have access to the iss/address only when it's passed by a dev, so when on("auth_request") is triggered, a dev calls |
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.
@flypaper0 let's add formatMessage method to AuthSDK
Description
To support multi-account feature SDK should not store Account object. Account will be passed with
respond
method.This makes problematic to generate finalised SIWE message for clients. I suggest to open SIWEMessageFormatter interface to allow this: