Skip to content
Merged
Show file tree
Hide file tree
Changes from 4 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
14 changes: 7 additions & 7 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
"homepage": "https://github.com/auth0/auth0-deploy-cli#readme",
"dependencies": {
"ajv": "^6.12.6",
"auth0": "^4.16.0",
"auth0": "^4.17.0",
"dot-prop": "^5.2.0",
"fs-extra": "^10.1.0",
"global-agent": "^3.0.0",
Expand Down
2 changes: 1 addition & 1 deletion src/tools/auth0/handlers/connections.ts
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,7 @@ export default class ConnectionsHandler extends DefaultAPIHandler {
include_totals: true,
});

// Filter out database connections
// Filter out database connections as we have separate handler for it
this.existing = connections.filter((c) => c.strategy !== 'auth0');
if (this.existing === null) return [];

Expand Down
5 changes: 5 additions & 0 deletions src/tools/constants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ const EMAIL_VERIFY = 'verify_email';
const EMAIL_VERIFY_BY_CODE = 'verify_email_by_code';
const EMAIL_RESET = 'reset_email';
const EMAIL_WELCOME = 'welcome_email';
const EMAIL_RESET_BY_CODE = 'reset_email_by_code';
const EMAIL_BLOCKED = 'blocked_account';
const EMAIL_STOLEN_CREDENTIALS = 'stolen_credentials';
const EMAIL_ENROLLMENT = 'enrollment_email';
Expand Down Expand Up @@ -51,6 +52,7 @@ const constants = {
'verify_email',
'verify_email_by_code',
'reset_email',
'reset_email_by_code',
'welcome_email',
'blocked_account',
'stolen_credentials',
Expand All @@ -73,6 +75,7 @@ const constants = {
EMAIL_VERIFY,
EMAIL_VERIFY_BY_CODE,
EMAIL_RESET,
EMAIL_RESET_BY_CODE,
EMAIL_WELCOME,
EMAIL_BLOCKED,
EMAIL_STOLEN_CREDENTIALS,
Expand Down Expand Up @@ -155,6 +158,8 @@ const constants = {
`${EMAIL_VERIFY_BY_CODE}.html`,
`${EMAIL_RESET}.json`,
`${EMAIL_RESET}.html`,
`${EMAIL_RESET_BY_CODE}.json`,
`${EMAIL_RESET_BY_CODE}.html`,
`${EMAIL_WELCOME}.json`,
`${EMAIL_WELCOME}.html`,
`${EMAIL_BLOCKED}.json`,
Expand Down
11 changes: 11 additions & 0 deletions test/tools/auth0/handlers/databases.tests.js
Original file line number Diff line number Diff line change
Expand Up @@ -451,6 +451,7 @@ describe('#databases handler', () => {

await stageFn.apply(handler, [assets]);
});

it('should update database when attributes are passed', async () => {
const auth0 = {
connections: {
Expand Down Expand Up @@ -482,6 +483,7 @@ describe('#databases handler', () => {
active: true,
},
profile_required: true,
verification_method: 'otp',
},
username: {
signup: {
Expand Down Expand Up @@ -534,6 +536,7 @@ describe('#databases handler', () => {
active: true,
},
profile_required: true,
verification_method: 'otp',
},
username: {
signup: {
Expand All @@ -558,6 +561,7 @@ describe('#databases handler', () => {

await stageFn.apply(handler, [{ databases: data }]);
});

it('should update database when require username and validation are passed', async () => {
const auth0 = {
connections: {
Expand Down Expand Up @@ -861,6 +865,7 @@ describe('#databases handler', () => {
active: true,
},
profile_required: true,
verification_method:'link'
},
username: {
signup: {
Expand Down Expand Up @@ -1061,6 +1066,7 @@ describe('#databases handler', () => {
// eslint-disable-next-line no-unused-expressions
expect(updateArgs.options.requires_username).to.exist;
});

it('should update database when attributes are passed', async () => {
const auth0 = {
connections: {
Expand Down Expand Up @@ -1092,6 +1098,7 @@ describe('#databases handler', () => {
active: true,
},
profile_required: true,
verification_method:'otp',
},
username: {
signup: {
Expand Down Expand Up @@ -1144,6 +1151,7 @@ describe('#databases handler', () => {
active: true,
},
profile_required: true,
verification_method: 'otp',
},
username: {
signup: {
Expand All @@ -1168,6 +1176,7 @@ describe('#databases handler', () => {

await stageFn.apply(handler, [{ databases: data }]);
});

it('should update database when require username and validation are passed', async () => {
const auth0 = {
connections: {
Expand Down Expand Up @@ -1316,6 +1325,7 @@ describe('#databases handler', () => {
identifier: {
active: true,
},
verification_method: 'link',
profile_required: true,
},
username: {
Expand Down Expand Up @@ -1471,6 +1481,7 @@ describe('#databases handler', () => {
active: true,
},
profile_required: true,
verification_method:'link',
},
username: {
signup: {
Expand Down
Loading