From e70674ff97afad5ececb6e9da7459e220b5b40c6 Mon Sep 17 00:00:00 2001 From: Marian Steinbach Date: Fri, 16 Feb 2024 16:18:14 +0100 Subject: [PATCH] Fix env variable name in error message to ORIGIN --- login_script.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/login_script.js b/login_script.js index d7ef9ca..aa41a01 100644 --- a/login_script.js +++ b/login_script.js @@ -2,7 +2,7 @@ const REQUIRED_ORIGIN_PATTERN = /^((\*|([\w_-]{2,}))\.)*(([\w_-]{2,})\.)+(\w{2,})(\,((\*|([\w_-]{2,}))\.)*(([\w_-]{2,})\.)+(\w{2,}))*$/ if (!process.env.ORIGINS.match(REQUIRED_ORIGIN_PATTERN)) { - throw new Error('process.env.ORIGIN MUST be comma separated list \ + throw new Error('process.env.ORIGINS MUST be comma separated list \ of origins that login can succeed on.') } const origins = process.env.ORIGINS.split(',') @@ -44,4 +44,4 @@ module.exports = (oauthProvider, message, content) => ` console.log("Sending message: %o", "${oauthProvider}") window.opener.postMessage("authorizing:${oauthProvider}", "*") })() -` \ No newline at end of file +`