Skip to content

Commit 91d02b3

Browse files
committed
refactor(sandbox): refactor oauth example
refactor oauth example MIGRATION CHANGE: migration-20230323132703- refactor oauth example migration-20230524115047- refactor oauth example migration-20240116123737- refactor oauth example migration-20241105074844- refactor oauth example migration-20210421113146- refactor oauth example migration-20220607063927- refactor oauth example migration-20221110095658- refactor oauth example migration-20221123082900- refactor oauth example gh-0
1 parent 20257a1 commit 91d02b3

File tree

85 files changed

+7530
-3159
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

85 files changed

+7530
-3159
lines changed

package-lock.json

Lines changed: 3210 additions & 1575 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

sandbox/oauth-example/.dockerignore

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
1-
node_modules
1+
coverage
22
npm-debug.log
33
/dist
44
# Cache used by TypeScript's incremental build
55
*.tsbuildinfo
6+
mochawesome-report

sandbox/oauth-example/.env.defaults

Lines changed: 66 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,66 @@
1+
NODE_ENV=production
2+
LOG_LEVEL=info
3+
USER_TEMP_PASSWORD=temp123!@
4+
GOOGLE_AUTH_URL=q
5+
GOOGLE_AUTH_CLIENT_ID=a
6+
GOOGLE_AUTH_CLIENT_SECRET=q
7+
GOOGLE_AUTH_TOKEN_URL=q
8+
GOOGLE_AUTH_CALLBACK_URL=q
9+
GOOGLE_TOKEN_INFO_URL=q
10+
INSTAGRAM_AUTH_URL=q
11+
INSTAGRAM_AUTH_CLIENT_ID=a
12+
INSTAGRAM_AUTH_CLIENT_SECRET=q
13+
INSTAGRAM_AUTH_TOKEN_URL=q
14+
INSTAGRAM_AUTH_CALLBACK_URL=q
15+
SAML_URL=q
16+
SAML_CLIENT_ID=a
17+
SAML_CLIENT_SECRET=q
18+
SAML_TOKEN_URL=q
19+
SAML_CALLBACK_URL=q
20+
APPLE_AUTH_URL=q
21+
APPLE_AUTH_CLIENT_ID=a
22+
APPLE_AUTH_TEAM_ID=q
23+
APPLE_AUTH_KEY_ID=q
24+
APPLE_AUTH_CALLBACK_URL=q
25+
FACEBOOK_AUTH_URL=q
26+
FACEBOOK_AUTH_CLIENT_ID=a
27+
FACEBOOK_AUTH_CLIENT_SECRET=q
28+
FACEBOOK_AUTH_TOKEN_URL=q
29+
FACEBOOK_AUTH_CALLBACK_URL=q
30+
REDIS_PORT=a
31+
REDIS_HOST=a
32+
REDIS_URL=
33+
REDIS_PASSWORD=a
34+
REDIS_DATABASE=a
35+
FORGOT_PASSWORD_LINK_EXPIRY=30
36+
REQUEST_SIGNUP_LINK_EXPIRY=30
37+
38+
# AZURE AD
39+
#boolean values will be 0 or 1
40+
41+
AZURE_AUTH_ENABLED=0
42+
AZURE_IDENTITY_METADATA=https://login.microsoftonline.com/common/.well-known/openid-configuration
43+
AZURE_AUTH_CLIENT_ID=a
44+
AZURE_AUTH_REDIRECT_URL=url
45+
AZURE_AUTH_CLIENT_SECRET=client_secret
46+
AZURE_AUTH_ALLOW_HTTP_REDIRECT=1
47+
AZURE_AUTH_COOKIE_INSTEAD_SESSION=1
48+
AZURE_AUTH_PASS_REQ_CALLBACK=0
49+
AZURE_AUTH_VALIDATE_ISSUER=0
50+
AZURE_AUTH_B2C_TENANT=0
51+
AZURE_AUTH_CLOCK_SKEW=300
52+
AZURE_AUTH_LOG_LEVEL=
53+
AZURE_AUTH_LOG_PII=1
54+
AZURE_AUTH_NONCE_TIME=3600
55+
AZURE_AUTH_NONCE_COUNT=10
56+
AZURE_AUTH_ISSUER=
57+
58+
# key is 32 bit
59+
60+
AZURE_AUTH_COOKIE_KEY=
61+
62+
#iv is 12 bit
63+
64+
AZURE_AUTH_COOKIE_IV=
65+
66+
MAX_JWT_KEYS=2

sandbox/oauth-example/.env.example

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
NODE_ENV=
2+
LOG_LEVEL=
3+
DB_HOST=
4+
DB_PORT=
5+
DB_USER=
6+
DB_PASSWORD=
7+
DB_DATABASE=
8+
DB_SCHEMA=
9+
REDIS_HOST=
10+
REDIS_PORT=
11+
REDIS_URL=
12+
REDIS_PASSWORD=
13+
REDIS_DATABASE=
14+
JWT_SECRET=
15+
JWT_ISSUER=
16+
GOOGLE_AUTH_URL=
17+
GOOGLE_AUTH_CLIENT_ID=
18+
GOOGLE_AUTH_CLIENT_SECRET=
19+
GOOGLE_AUTH_TOKEN_URL=
20+
GOOGLE_AUTH_CALLBACK_URL=

sandbox/oauth-example/.eslintignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,6 @@ node_modules/
22
dist/
33
coverage/
44
migrations/
5+
migration.js
56
.eslintrc.js
7+
mochawesome-report/

sandbox/oauth-example/.eslintrc.js

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,13 @@
11
module.exports = {
22
extends: '@loopback/eslint-config',
3+
rules: {
4+
'no-extra-boolean-cast': 'off',
5+
'@typescript-eslint/interface-name-prefix': 'off',
6+
'no-prototype-builtins': 'off',
7+
'no-await-in-loop': 'error',
8+
},
9+
parserOptions: {
10+
project: './tsconfig.json',
11+
tsconfigRootDir: __dirname,
12+
},
313
};

sandbox/oauth-example/.mocharc.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
{
22
"exit": true,
33
"recursive": true,
4-
"require": "source-map-support/register"
4+
"require": "source-map-support/register",
5+
"reporter": "mochawesome"
56
}

sandbox/oauth-example/.nycrc

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
{
2+
"extends": "@istanbuljs/nyc-config-typescript",
3+
"all": true,
4+
"reporter": ["html", "text-summary"]
5+
}

sandbox/oauth-example/.prettierignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,5 @@
11
dist
22
*.json
3+
coverage
4+
mochawesome-report
5+
node_modules/

sandbox/oauth-example/.vscode/settings.json

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@
55
"editor.trimAutoWhitespace": true,
66
"editor.formatOnSave": true,
77
"editor.codeActionsOnSave": {
8-
"source.organizeImports": true,
9-
"source.fixAll.eslint": true
8+
"source.organizeImports": "explicit",
9+
"source.fixAll.eslint": "explicit"
1010
},
1111

1212
"files.exclude": {
@@ -15,7 +15,7 @@
1515
"**/.hg": true,
1616
"**/.svn": true,
1717
"**/CVS": true,
18-
"dist": true,
18+
"dist": true
1919
},
2020
"files.insertFinalNewline": true,
2121
"files.trimTrailingWhitespace": true,
@@ -25,8 +25,5 @@
2525
"typescript.preferences.quoteStyle": "single",
2626
"eslint.run": "onSave",
2727
"eslint.nodePath": "./node_modules",
28-
"eslint.validate": [
29-
"javascript",
30-
"typescript"
31-
]
28+
"eslint.validate": ["javascript", "typescript"]
3229
}

0 commit comments

Comments
 (0)