opengovsg / sgid-client

The official TypeScript/JavaScript SDK for sgID
MIT License
11 stars 6 forks source link

feat: expose generateNonce util #62

Closed mantariksh closed 1 year ago

mantariksh commented 1 year ago

Closes #61

Alternatives considered

Use string length as an argument instead of number of bytes My concern with this was that the user wants control over how random they want the nonce to be, and string length doesn't give them direct control over that. This is because the length can vary based on encoding rather than actual underlying randomness.

liangyuanruo commented 1 year ago

FYI @kwajiehao @PrawiraGenestonlia the issue arose in this PR comment, when @mantariksh was implementing SGID login for CalSG.