MCPcopy Create free account
hub / github.com/chainjet/platform / getNonce

Method getNonce

apps/api/src/auth/controllers/auth.controller.ts:30–38  ·  view source on GitHub ↗
(@Req() req: Request, @Session() session: Record<string, any>)

Source from the content-addressed store, hash-verified

28
29 @Post('nonce')
30 async getNonce(@Req() req: Request, @Session() session: Record<string, any>) {
31 const nonce = generateNonce()
32 if (req.body.uuid) {
33 await this.cacheManager.set(`siwe-nonce:${req.body.uuid}`, nonce, { ttl: 60 * 10 } as any)
34 } else {
35 session.nonce = nonce
36 }
37 return nonce
38 }
39
40 @Post('login')
41 async loginWithSignature(

Callers

nothing calls this directly

Calls 1

setMethod · 0.80

Tested by

no test coverage detected