Skip to content

Commit

Permalink
Merge pull request #6 from credebl/feat/added-env-and-common-constant
Browse files Browse the repository at this point in the history
feat: added env logic and logger file
  • Loading branch information
tipusinghaw authored Sep 27, 2024
2 parents 8062be4 + 6a39824 commit 25146d5
Show file tree
Hide file tree
Showing 8 changed files with 1,818 additions and 3,114 deletions.
18 changes: 18 additions & 0 deletions .env.sample
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# The RP ID represents the Relying Party identifiers.
# This should be a JSON array of strings, representing the origins (hostnames) of the server.
# Example: For local development, it could be '["localhost"]'.
# In production, it might include multiple domains like '["example.com", "sub.example.com"]'.
RP_ID='["localhost"]'

# The expected origins define a list of URLs where the authentication is expected to originate from.
# This should be a JSON array of strings (URLs). These URLs represent the frontend origins that will be allowed to register or authenticate.
# Example: For development on localhost, use '["http://localhost:3000", "http://localhost:3001"]'.
EXPECTED_ORIGINS='["http://localhost:3000", "http://localhost:3001"]'

# Enable FIDO conformance testing by setting this to 'true' or 'false'.
# Set this to 'true' if you need to test the server with FIDO conformance tools, otherwise leave it 'false'.
ENABLE_CONFORMANCE=false

# Enable HTTPS by setting this to 'true' for production environments with HTTPS support.
# In development, you can leave it as 'false' to use HTTP.
ENABLE_HTTPS=false
5 changes: 4 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,5 @@
# dependencies
node_modules/
node_modules/
combined.log
.env
error.log
4 changes: 4 additions & 0 deletions constants.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
export const DEFAULT_EXPECTED_ORIGINS = ['http://localhost:3000', 'http://localhost:3001'];
export const DEFAULT_RP_ID = ['localhost'];
export const TIMEOUT = 60000
export const RP_NAME = 'CREDEBL'
Loading

0 comments on commit 25146d5

Please sign in to comment.