0
Fork 0
mirror of https://github.com/TryGhost/Ghost.git synced 2025-01-20 22:42:53 -05:00

Added members_email_auth_secret setting

no-issue

This will be used for signing HS256 JWTs it's a 64 byte (256 bit) hex
string
This commit is contained in:
Fabien O'Carroll 2019-10-10 17:31:19 +07:00
parent 8b0130193c
commit cbb13904b8
3 changed files with 7 additions and 3 deletions

View file

@ -194,6 +194,9 @@
"members_session_secret": {
"defaultValue": null
},
"members_email_auth_secret": {
"defaultValue": null
},
"default_content_visibility": {
"defaultValue": "public"
},

View file

@ -37,7 +37,8 @@ function parseDefaultSettings() {
members_session_secret: () => crypto.randomBytes(32).toString('hex'),
theme_session_secret: () => crypto.randomBytes(32).toString('hex'),
members_public_key: () => getMembersKey('public'),
members_private_key: () => getMembersKey('private')
members_private_key: () => getMembersKey('private'),
members_email_auth_secret: () => crypto.randomBytes(64).toString('hex')
};
_.each(defaultSettingsInCategories, function each(settings, categoryName) {

View file

@ -113,7 +113,7 @@ describe('Unit: models/settings', function () {
return models.Settings.populateDefaults()
.then(() => {
eventSpy.callCount.should.equal(80);
eventSpy.callCount.should.equal(82);
eventSpy.args[1][0].should.equal('settings.db_hash.added');
eventSpy.args[1][1].attributes.type.should.equal('core');
@ -137,7 +137,7 @@ describe('Unit: models/settings', function () {
return models.Settings.populateDefaults()
.then(() => {
eventSpy.callCount.should.equal(78);
eventSpy.callCount.should.equal(80);
eventSpy.args[13][0].should.equal('settings.logo.added');
});