diff --git a/services/web/scripts/oauth/register_client.js b/services/web/scripts/oauth/register_client.js index 4c4601d921..d5687d03f7 100644 --- a/services/web/scripts/oauth/register_client.js +++ b/services/web/scripts/oauth/register_client.js @@ -1,6 +1,9 @@ const minimist = require('minimist') const { ObjectId } = require('mongodb') const { waitForDb, db } = require('../../app/src/infrastructure/mongodb') +const { + hashSecret, +} = require('../../modules/oauth2-server/app/src/SecretsHelper') async function main() { const opts = parseArgs() @@ -40,7 +43,7 @@ async function upsertApplication(opts) { updates.name = opts.name } if (opts.secret != null) { - updates.clientSecret = opts.secret + updates.clientSecret = hashSecret(opts.secret) } if (opts.grants != null) { updates.grants = opts.grants