Skip to content

refactor(sandbox): refactor auth basic login signup #2238

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4,886 changes: 3,262 additions & 1,624 deletions package-lock.json

Large diffs are not rendered by default.

3 changes: 2 additions & 1 deletion sandbox/auth-ms-basic-example/.dockerignore
100644 → 100755
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
node_modules
coverage
npm-debug.log
/dist
# Cache used by TypeScript's incremental build
*.tsbuildinfo
mochawesome-report
78 changes: 66 additions & 12 deletions sandbox/auth-ms-basic-example/.env.defaults
100644 → 100755
Original file line number Diff line number Diff line change
@@ -1,12 +1,66 @@
REDIS_HOST=
REDIS_PORT=
REDIS_PASSWORD=
REDIS_DB=
DB_HOST=
DB_PORT=
DB_USER=
DB_PASSWORD=
DB_DATABASE=
DB_SCHEMA=
JWT_SECRET=
JWT_ISSUER=
NODE_ENV=production
LOG_LEVEL=info
USER_TEMP_PASSWORD=temp123!@
GOOGLE_AUTH_URL=q
GOOGLE_AUTH_CLIENT_ID=a
GOOGLE_AUTH_CLIENT_SECRET=q
GOOGLE_AUTH_TOKEN_URL=q
GOOGLE_AUTH_CALLBACK_URL=q
GOOGLE_TOKEN_INFO_URL=q
INSTAGRAM_AUTH_URL=q
INSTAGRAM_AUTH_CLIENT_ID=a
INSTAGRAM_AUTH_CLIENT_SECRET=q
INSTAGRAM_AUTH_TOKEN_URL=q
INSTAGRAM_AUTH_CALLBACK_URL=q
SAML_URL=q
SAML_CLIENT_ID=a
SAML_CLIENT_SECRET=q
SAML_TOKEN_URL=q
SAML_CALLBACK_URL=q
APPLE_AUTH_URL=q
APPLE_AUTH_CLIENT_ID=a
APPLE_AUTH_TEAM_ID=q
APPLE_AUTH_KEY_ID=q
APPLE_AUTH_CALLBACK_URL=q
FACEBOOK_AUTH_URL=q
FACEBOOK_AUTH_CLIENT_ID=a
FACEBOOK_AUTH_CLIENT_SECRET=q
FACEBOOK_AUTH_TOKEN_URL=q
FACEBOOK_AUTH_CALLBACK_URL=q
REDIS_PORT=a
REDIS_HOST=a
REDIS_URL=
REDIS_PASSWORD=a
REDIS_DATABASE=a
FORGOT_PASSWORD_LINK_EXPIRY=30
REQUEST_SIGNUP_LINK_EXPIRY=30

# AZURE AD
#boolean values will be 0 or 1

AZURE_AUTH_ENABLED=0
AZURE_IDENTITY_METADATA=https://login.microsoftonline.com/common/.well-known/openid-configuration
AZURE_AUTH_CLIENT_ID=a
AZURE_AUTH_REDIRECT_URL=url
AZURE_AUTH_CLIENT_SECRET=client_secret
AZURE_AUTH_ALLOW_HTTP_REDIRECT=1
AZURE_AUTH_COOKIE_INSTEAD_SESSION=1
AZURE_AUTH_PASS_REQ_CALLBACK=0
AZURE_AUTH_VALIDATE_ISSUER=0
AZURE_AUTH_B2C_TENANT=0
AZURE_AUTH_CLOCK_SKEW=300
AZURE_AUTH_LOG_LEVEL=
AZURE_AUTH_LOG_PII=1
AZURE_AUTH_NONCE_TIME=3600
AZURE_AUTH_NONCE_COUNT=10
AZURE_AUTH_ISSUER=

# key is 32 bit

AZURE_AUTH_COOKIE_KEY=

#iv is 12 bit

AZURE_AUTH_COOKIE_IV=

MAX_JWT_KEYS=2
98 changes: 87 additions & 11 deletions sandbox/auth-ms-basic-example/.env.example
100644 → 100755
Original file line number Diff line number Diff line change
@@ -1,11 +1,87 @@
DB_HOST=
DB_PORT=
DB_USER=
DB_PASSWORD=
DB_DATABASE=
REDIS_HOST=
REDIS_PORT=
REDIS_PASSWORD=
REDIS_DB=
JWT_SECRET=
JWT_ISSUER=
# NODE_ENV=
# LOG_LEVEL=
# DB_HOST=
# DB_PORT=
# DB_USER=
# DB_PASSWORD=
# DB_DATABASE=
# DB_SCHEMA=
# REDIS_HOST=
# REDIS_PORT=
# REDIS_URL=
# REDIS_PASSWORD=
# REDIS_DATABASE=
# PRIVATE_DECRYPTION_KEY=
# JWT_SECRET=
# JWT_ISSUER=
# USER_TEMP_PASSWORD=
# GOOGLE_AUTH_URL=
# GOOGLE_AUTH_CLIENT_ID=
# GOOGLE_AUTH_CLIENT_SECRET=
# GOOGLE_AUTH_TOKEN_URL=
# GOOGLE_AUTH_CALLBACK_URL=
# GOOGLE_TOKEN_INFO_URL=
# SAML_URL=
# SAML_CLIENT_ID=
# SAML_CLIENT_SECRET=
# SAML_TOKEN_URL=
# SAML_CALLBACK_URL=
# INSTAGRAM_AUTH_URL=
# INSTAGRAM_AUTH_CLIENT_ID=
# INSTAGRAM_AUTH_CLIENT_SECRET=
# INSTAGRAM_AUTH_TOKEN_URL=
# INSTAGRAM_AUTH_CALLBACK_URL=
# APPLE_AUTH_URL=
# APPLE_AUTH_CLIENT_ID=
# APPLE_AUTH_TEAM_ID=
# APPLE_AUTH_KEY_ID=
# APPLE_AUTH_CALLBACK_URL=
# FACEBOOK_AUTH_URL=
# FACEBOOK_AUTH_CLIENT_ID=
# FACEBOOK_AUTH_CLIENT_SECRET=
# FACEBOOK_AUTH_TOKEN_URL=
# FACEBOOK_AUTH_CALLBACK_URL=
# FORGOT_PASSWORD_LINK_EXPIRY=
# KEYCLOAK_HOST=
# KEYCLOAK_REALM=
# KEYCLOAK_CLIENT_ID=
# KEYCLOAK_CLIENT_SECRET=
# KEYCLOAK_CALLBACK_URL=

# # AZURE AD
# #boolean values will be 0 or 1

# AZURE_AUTH_ENABLED=
# AZURE_IDENTITY_METADATA=
# AZURE_AUTH_CLIENT_ID=
# AZURE_AUTH_REDIRECT_URL=
# AZURE_AUTH_CLIENT_SECRET=
# AZURE_AUTH_ALLOW_HTTP_REDIRECT=
# AZURE_AUTH_COOKIE_INSTEAD_SESSION=
# AZURE_AUTH_PASS_REQ_CALLBACK=
# AZURE_AUTH_VALIDATE_ISSUER=
# AZURE_AUTH_B2C_TENANT=
# AZURE_AUTH_CLOCK_SKEW=
# AZURE_AUTH_LOG_LEVEL=
# AZURE_AUTH_LOG_PII=
# AZURE_AUTH_NONCE_TIME=
# AZURE_AUTH_NONCE_COUNT=
# AZURE_AUTH_ISSUER=

# # key is 32 bit

# AZURE_AUTH_COOKIE_KEY=

# #iv is 12 bit

# AZURE_AUTH_COOKIE_IV=


# AUTH0_DOMAIN=
# AUTH0_CLIENT_ID=
# AUTH0_CLIENT_SECRET=
# AUTH0_CALLBACK_URL=

# MAX_JWT_KEYS=
# JWT_PRIVATE_KEY_PASSPHRASE=
# API_BASE_URL=
4 changes: 2 additions & 2 deletions sandbox/auth-ms-basic-example/.eslintignore
100644 → 100755
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
node_modules/
dist/
coverage/
migrations/
migration.js
.eslintrc.js
mochawesome-report
migrations/
5 changes: 5 additions & 0 deletions sandbox/auth-ms-basic-example/.eslintrc.js
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,10 @@ module.exports = {
'no-extra-boolean-cast': 'off',
'@typescript-eslint/interface-name-prefix': 'off',
'no-prototype-builtins': 'off',
'no-await-in-loop': 'error',
},
parserOptions: {
project: './tsconfig.json',
tsconfigRootDir: __dirname,
},
};
Empty file modified sandbox/auth-ms-basic-example/.gitignore
100644 → 100755
Empty file.
3 changes: 2 additions & 1 deletion sandbox/auth-ms-basic-example/.mocharc.json
100644 → 100755
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
{
"exit": true,
"recursive": true,
"require": "source-map-support/register"
"require": "source-map-support/register",
"reporter": "mochawesome"
}
5 changes: 5 additions & 0 deletions sandbox/auth-ms-basic-example/.nycrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"extends": "@istanbuljs/nyc-config-typescript",
"all": true,
"reporter": ["html", "text-summary"]
}
3 changes: 3 additions & 0 deletions sandbox/auth-ms-basic-example/.prettierignore
100644 → 100755
Original file line number Diff line number Diff line change
@@ -1,2 +1,5 @@
dist
*.json
coverage
mochawesome-report
node_modules/
Empty file modified sandbox/auth-ms-basic-example/.prettierrc
100644 → 100755
Empty file.
Empty file modified sandbox/auth-ms-basic-example/.vscode/launch.json
100644 → 100755
Empty file.
11 changes: 4 additions & 7 deletions sandbox/auth-ms-basic-example/.vscode/settings.json
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@
"editor.trimAutoWhitespace": true,
"editor.formatOnSave": true,
"editor.codeActionsOnSave": {
"source.organizeImports": true,
"source.fixAll.eslint": true
"source.organizeImports": "explicit",
"source.fixAll.eslint": "explicit"
},

"files.exclude": {
Expand All @@ -15,7 +15,7 @@
"**/.hg": true,
"**/.svn": true,
"**/CVS": true,
"dist": true,
"dist": true
},
"files.insertFinalNewline": true,
"files.trimTrailingWhitespace": true,
Expand All @@ -25,8 +25,5 @@
"typescript.preferences.quoteStyle": "single",
"eslint.run": "onSave",
"eslint.nodePath": "./node_modules",
"eslint.validate": [
"javascript",
"typescript"
]
"eslint.validate": ["javascript", "typescript"]
}
Empty file modified sandbox/auth-ms-basic-example/.vscode/tasks.json
100644 → 100755
Empty file.
4 changes: 2 additions & 2 deletions sandbox/auth-ms-basic-example/.yo-rc.json
100644 → 100755
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"@loopback/cli": {
"@sourceloop/cli": {
"packageManager": "npm",
"version": "2.18.0"
"version": "5.2.4"
}
}
Loading
Loading