Skip to content

Commit

Permalink
RP_ID added to .env
Browse files Browse the repository at this point in the history
  • Loading branch information
moiskillnadne committed Oct 26, 2024
1 parent cd1c4a4 commit 6d6e63f
Show file tree
Hide file tree
Showing 4 changed files with 34 additions and 14 deletions.
41 changes: 28 additions & 13 deletions .env.example
Original file line number Diff line number Diff line change
@@ -1,18 +1,33 @@
ENV="dev"
PORT=3001
SQLITE_DB_PATH="path-to-sqlite-db"
SENDGRID_API_KEY="secret-key"
JWT_ACCESS_SECRET="secret-key"
JWT_REFRESH_SECRET="secret-key"
SENTRY_DSN="DNS_STRING"
# DON`T FORGET TO UPDATE BUILD.JS WITH NEW ENV VARIABLES

LOGIN_OTP_TEMPLATE_ID="template_id"
ENV="local"
PORT="number"
SQLITE_DB_PATH="string"
SENTRY_DSN="string"

# JWT
JWT_ACCESS_SECRET="string"
JWT_REFRESH_SECRET="string"

# AWS
CLOUD_WATCH_LOG_GROUP="YourLogGroup"
CLOUD_WATCH_LOG_STREAM="logStreamName"
CLOUD_WATCH_LOG_GROUP="string"
CLOUD_WATCH_LOG_STREAM="string"

AWS_REGION="string"

AWS_ACCESS_KEY_ID="string"
AWS_SECRET_KEY="string"

# SendGrid
SENDGRID_API_KEY="string"

# SendGrid Template IDS
LOGIN_OTP_TEMPLATE_ID="string"

AWS_REGION="REGION"
# Redis
REDIS_HOST="string"
REDIS_PORT="number"
REDIS_DB="number"

AWS_ACCESS_KEY_ID=""
AWS_SECRET_KEY=""
# Passkeys
RP_ID="string"
1 change: 1 addition & 0 deletions build.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ const env = {
'process.env.REDIS_HOST': JSON.stringify(process.env.REDIS_HOST),
'process.env.REDIS_PORT': JSON.stringify(process.env.REDIS_PORT),
'process.env.REDIS_DB': JSON.stringify(process.env.REDIS_DB),
'process.env.RP_ID': JSON.stringify(process.env.RP_ID),
};


Expand Down
2 changes: 2 additions & 0 deletions src/core/constants/env.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,4 +22,6 @@ export const Env = {
REDIS_HOST: process.env.REDIS_HOST,
REDIS_PORT: process.env.REDIS_PORT,
REDIS_DB: process.env.REDIS_DB,

RP_ID: process.env.RP_ID,
};
4 changes: 3 additions & 1 deletion src/core/constants/rp.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
import { Env } from './env';

export const rpName = 'Challenge Logger';

export const rpID = 'devapp.challengelogger.ru';
export const rpID = Env.RP_ID ?? 'localhost:3001';

export const origin = `https://${rpID}`;

0 comments on commit 6d6e63f

Please sign in to comment.