hash user id and app id

This commit is contained in:
Chris Cassano
2022-11-14 14:07:25 -08:00
parent 010b2fce10
commit 02a5ff37b7
4 changed files with 10 additions and 8 deletions

View File

@ -55,7 +55,7 @@ function App() {
let jwtParts = credentialResponse.credential.split(".");
let jwtPayload = JSON.parse(Base64.decode(jwtParts[1]));
let idForAuthMethod = ethers.utils.hexlify(
let idForAuthMethod = ethers.utils.keccak256(
ethers.utils.toUtf8Bytes(`${jwtPayload.sub}:${jwtPayload.aud}`)
);
@ -128,7 +128,9 @@ function App() {
};
// get the user a session with it
const litNodeClient = new LitJsSdk.LitNodeClient({ litNetwork: "serrano" });
const litNodeClient = new LitJsSdk.LitNodeClient({
litNetwork: "serrano",
});
await litNodeClient.connect();
const sessionSigs = await litNodeClient.getSessionSigs({

View File

@ -15,4 +15,4 @@
"litNodeDomainName": "127.0.0.1",
"litNodePort": 7470,
"rocketPort": 7470
}
}