-
Notifications
You must be signed in to change notification settings - Fork 11
Init Stellar Custom Auth Guide #286
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
Conversation
✅ Deploy Preview for lit-dev-docs ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
If the intention of this guide is to be used by novice devs, should we wait to release until it's re-written with that safer approach? |
}); | ||
await litNodeClient.connect(); | ||
``` | ||
Once we have a connected client, the next step is authenticating and authorizing ourselves to use the Lit Network. To do this, we're going to instantiate an instance of ethers.js `Wallet`: |
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.
Might be helpful to call out that an Ethereum client is necessary to authenticate to Lit (if that's the case), even though we're interacting with Stellar, and that this wallet will not be used for anything related to funds.
nonce: await litNodeClient!.getLatestBlockhash(), | ||
litNodeClient, | ||
}); | ||
return await generateAuthSig({ |
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 the AuthSig part of this still relevant given Auth Unification?
); | ||
``` | ||
|
||
And then create a [Session Signature](../../../sdk/authentication/session-sigs/intro.md): |
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.
Does this only work on Cayenne? Will this guide be followable if they're using Manzano/Habanero? If not, we should provide a link to some static doc (Maybe the "Migrating from earlier versions" page?) where they can learn all the changes needed to get it working on those networks and, eventually Datil so we don't have to update this again.
Seems like the guide addresses the motivation stated at the beginning. I wasn't caught up on the brief for this one, and I don't have much background on Stellar, but from what I can follow in the guide it looks like it would be capable of checking whether an address is listed as potentially approved (via simulation) in a smart contract on Stellar and return a signed confirmation of that through the Lit Action. One question I have is whether we're responsible for showing the pre-step of creating that address beforehand and adding it to the contract separately, so that you can actually demonstrate a success here. That same address and private key used to upload it to the contract would have to then be passed into the guide code. If that's covered by our users elsewhere cool, but if not we'd want to show that so we can follow it end to end. Looking good though! Left other comments inline, so once we figure these out (especially that major security caveat you mentioned) and someone else confirms this works we can move to merge. Thanks @spacesailor24 ! |
@alexvotofuture It is included in the code README, so I can just copy/paste it into the guide |
This guide walks through the lit-access-control-conditions-stellar code.
There a huge caveat to this implementation: