Skip to content

Commit

Permalink
fix: create siwe uri from nodejs url
Browse files Browse the repository at this point in the history
  • Loading branch information
JGiter committed Feb 22, 2023
1 parent 1450913 commit 531bcc7
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions src/modules/cache-client/auth.ts
Expand Up @@ -29,12 +29,15 @@ export class SsiAuth {
const {
data: { nonce },
} = await this.http.post<{ nonce: string }>('/login/siwe/initiate');
const uri = new URL(
'/login/siwe/verify',
cacheConfigs()[this.signerService.chainId].url
).href;
const siweMessage = new SiweMessage({
statement: `I accept the Terms of Service: ${this.config.domain}`,
nonce,
domain: new URL(this.config.domain).host,
address: this.signerService.address,
uri: `${cacheConfigs()[this.signerService.chainId].url}login/siwe/verify`,
uri,
version: '1',
chainId: this.signerService.chainId,
});
Expand Down

0 comments on commit 531bcc7

Please sign in to comment.