-
Notifications
You must be signed in to change notification settings - Fork 18
random string with CSPRNG #24
Comments
Cool. Should we replace our random string util with this? Maybe our generators should also offer to generate the cookie secret? =) |
Do the generators already generate a cookie secret? looks like https://github.com/keystonejs/generator-keystone/search?utf8=%E2%9C%93&q=cookieSecret&type=Code |
@JedWatson does keystone-utils have to work in the browser as well? this affects the solution |
Yes, but it uses I believe it's safe to use |
https://github.com/keystonejs/generator-keystone/blob/89419a6fb41b0cd744937f441c2d46229b775a30/app/index.js#L284 uses I'm inclined to simply use |
A CSPRNG random string generator with a CLI would be very useful for things like generating the cookie secret, etc...
Is something like that already available?
The current
Math.random()
implementation is quite weak, cryptographically speaking, and should not be used for those purposes.The text was updated successfully, but these errors were encountered: