New login screen (#1331)
* wip * feat: first draft of auth.config * chore: auth methodS * chore: styling * styling, styling, styling * feat: Auth notices * chore: Remove server-rendered pages, move shared/components -> components * lint * cleanup * cleanup * fix: Remove unused component * fix: Ensure env variables in prod too * style tweaks * fix: Entering SSO email into login form fails fix: Tweak language around guest signin
This commit is contained in:
34
index.js
34
index.js
@ -1,12 +1,12 @@
|
||||
// @flow
|
||||
require('./init');
|
||||
require("./init");
|
||||
|
||||
if (
|
||||
!process.env.SECRET_KEY ||
|
||||
process.env.SECRET_KEY === 'generate_a_new_key'
|
||||
process.env.SECRET_KEY === "generate_a_new_key"
|
||||
) {
|
||||
console.error(
|
||||
'The SECRET_KEY env variable must be set with the output of `openssl rand -hex 32`'
|
||||
"The SECRET_KEY env variable must be set with the output of `openssl rand -hex 32`"
|
||||
);
|
||||
// $FlowFixMe
|
||||
process.exit(1);
|
||||
@ -14,11 +14,11 @@ if (
|
||||
|
||||
if (process.env.AWS_ACCESS_KEY_ID) {
|
||||
[
|
||||
'AWS_REGION',
|
||||
'AWS_SECRET_ACCESS_KEY',
|
||||
'AWS_S3_UPLOAD_BUCKET_URL',
|
||||
'AWS_S3_UPLOAD_BUCKET_NAME',
|
||||
'AWS_S3_UPLOAD_MAX_SIZE',
|
||||
"AWS_REGION",
|
||||
"AWS_SECRET_ACCESS_KEY",
|
||||
"AWS_S3_UPLOAD_BUCKET_URL",
|
||||
"AWS_S3_UPLOAD_BUCKET_NAME",
|
||||
"AWS_S3_UPLOAD_MAX_SIZE",
|
||||
].forEach(key => {
|
||||
if (!process.env[key]) {
|
||||
console.error(`The ${key} env variable must be set when using AWS`);
|
||||
@ -40,7 +40,7 @@ if (process.env.SLACK_KEY) {
|
||||
|
||||
if (!process.env.URL) {
|
||||
console.error(
|
||||
'The URL env variable must be set to the externally accessible URL, e.g (https://www.getoutline.com)'
|
||||
"The URL env variable must be set to the externally accessible URL, e.g (https://www.getoutline.com)"
|
||||
);
|
||||
// $FlowFixMe
|
||||
process.exit(1);
|
||||
@ -48,7 +48,7 @@ if (!process.env.URL) {
|
||||
|
||||
if (!process.env.DATABASE_URL) {
|
||||
console.error(
|
||||
'The DATABASE_URL env variable must be set to the location of your postgres server, including authentication and port'
|
||||
"The DATABASE_URL env variable must be set to the location of your postgres server, including authentication and port"
|
||||
);
|
||||
// $FlowFixMe
|
||||
process.exit(1);
|
||||
@ -56,7 +56,7 @@ if (!process.env.DATABASE_URL) {
|
||||
|
||||
if (!process.env.REDIS_URL) {
|
||||
console.error(
|
||||
'The REDIS_URL env variable must be set to the location of your redis server, including authentication and port'
|
||||
"The REDIS_URL env variable must be set to the location of your redis server, including authentication and port"
|
||||
);
|
||||
// $FlowFixMe
|
||||
process.exit(1);
|
||||
@ -64,17 +64,17 @@ if (!process.env.REDIS_URL) {
|
||||
|
||||
if (!process.env.WEBSOCKETS_ENABLED) {
|
||||
console.log(
|
||||
'WARNING: Websockets are disabled. Set WEBSOCKETS_ENABLED env variable to true to enable'
|
||||
"WARNING: Websockets are disabled. Set WEBSOCKETS_ENABLED env variable to true to enable"
|
||||
);
|
||||
}
|
||||
|
||||
if (process.env.NODE_ENV === 'production') {
|
||||
console.log('\n\x1b[33m%s\x1b[0m', 'Running Outline in production mode.');
|
||||
} else if (process.env.NODE_ENV === 'development') {
|
||||
if (process.env.NODE_ENV === "production") {
|
||||
console.log("\n\x1b[33m%s\x1b[0m", "Running Outline in production mode.");
|
||||
} else if (process.env.NODE_ENV === "development") {
|
||||
console.log(
|
||||
'\n\x1b[33m%s\x1b[0m',
|
||||
"\n\x1b[33m%s\x1b[0m",
|
||||
'Running Outline in development mode with hot reloading. To run Outline in production mode set the NODE_ENV env variable to "production"'
|
||||
);
|
||||
}
|
||||
|
||||
require('./server');
|
||||
require("./server");
|
||||
|
Reference in New Issue
Block a user