-
Notifications
You must be signed in to change notification settings - Fork 23
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
Authentication providers #531
Authentication providers #531
Conversation
…rt generic auth-provider
edee0d5
to
41cebb2
Compare
794119b
to
5eec120
Compare
da5c631
to
56e9907
Compare
private readonly storage: LocalStorage; | ||
|
||
constructor( | ||
// TODO: We only need the provider to fetch the chainId, consider removing it | ||
private readonly provider: ethers.providers.Provider, |
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.
Seems like the only reason for provider
is to get the chain id, but isn't this available via the signer - https://docs.ethers.org/v5/api/signer/#Signer-getChainId;
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, that's correct. Signer is only to sign things, provider is to maintain communication with an external RPC / RPC provider
@@ -153,6 +154,8 @@ export const decrypt = async ( | |||
messageKit.acp.publicKey, | |||
); | |||
const ritual = await DkgClient.getActiveRitual(provider, domain, ritualId); | |||
// TODO: Temporary helper method to keep the external taco.ts decrypt function simple |
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's the long-term plan/vision for the TODO?
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.
To expose authentication providers in the user-facing TACo API once we are ready to release. This is going to be a breaking change and it makes sense to bundle it with other auth-related changes, and maybe context parameters refactor (more user-facing API).
More of a general question and something I may have missed - how is the above done by apps? |
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.
🎸
@@ -53,6 +54,7 @@ export class EIP4361SignatureProvider { | |||
return { signature, address, scheme, typedData: message }; | |||
} | |||
|
|||
// TODO: Create a facility to set these parameters or expose them to the user |
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.
If we haven't already, we should track this in an issue somewhere. L70 is particularly concerning - it's unclear how generic it is, as opposed to specific to the taco-composedb
demo.
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 will do that on the back of exposing authentication providers from taco
.
Created: #533
Type of PR:
Required reviews:
What this does:
Issues fixed/closed:
Why it's needed:
Notes for reviewers: