Skip to content

Commit

Permalink
Add support for login-passwordless prompt on Prompt Partials in P…
Browse files Browse the repository at this point in the history
…rompts Handler (#946)

* Added support for login-passwordless prompt on prompt partials

* Added Testcases for Prompts
  • Loading branch information
developerkunal authored Aug 27, 2024
1 parent 6381ce6 commit 88a7c49
Show file tree
Hide file tree
Showing 6 changed files with 45 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/tools/auth0/handlers/prompts.ts
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,7 @@ const customPartialsPromptTypes = [
'login',
'login-id',
'login-password',
'login-passwordless',
'signup',
'signup-id',
'signup-password',
Expand All @@ -112,6 +113,8 @@ const customPartialsScreenTypes = [
'signup',
'signup-id',
'signup-password',
'login-passwordless-sms-otp',
'login-passwordless-email-code'
] as const;

export type CustomPartialsScreenTypes = typeof customPartialsPromptTypes[number];
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11279,6 +11279,16 @@
"rawHeaders": [],
"responseIsBinary": false
},
{
"scope": "https://deploy-cli-dev.eu.auth0.com:443",
"method": "GET",
"path": "/api/v2/prompts/login-passwordless/partials",
"body": "",
"status": 200,
"response": {},
"rawHeaders": [],
"responseIsBinary": false
},
{
"scope": "https://deploy-cli-dev.eu.auth0.com:443",
"method": "GET",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12778,6 +12778,16 @@
"rawHeaders": [],
"responseIsBinary": false
},
{
"scope": "https://deploy-cli-dev.eu.auth0.com:443",
"method": "GET",
"path": "/api/v2/prompts/login-passwordless/partials",
"body": "",
"status": 200,
"response": {},
"rawHeaders": [],
"responseIsBinary": false
},
{
"scope": "https://deploy-cli-dev.eu.auth0.com:443",
"method": "GET",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1752,6 +1752,16 @@
"rawHeaders": [],
"responseIsBinary": false
},
{
"scope": "https://deploy-cli-dev.eu.auth0.com:443",
"method": "GET",
"path": "/api/v2/prompts/login-passwordless/partials",
"body": "",
"status": 200,
"response": {},
"rawHeaders": [],
"responseIsBinary": false
},
{
"scope": "https://deploy-cli-dev.eu.auth0.com:443",
"method": "GET",
Expand Down
10 changes: 10 additions & 0 deletions test/e2e/recordings/should-dump-without-throwing-an-error.json
Original file line number Diff line number Diff line change
Expand Up @@ -1710,6 +1710,16 @@
"rawHeaders": [],
"responseIsBinary": false
},
{
"scope": "https://deploy-cli-dev.eu.auth0.com:443",
"method": "GET",
"path": "/api/v2/prompts/login-passwordless/partials",
"body": "",
"status": 200,
"response": {},
"rawHeaders": [],
"responseIsBinary": false
},
{
"scope": "https://deploy-cli-dev.eu.auth0.com:443",
"method": "GET",
Expand Down
2 changes: 2 additions & 0 deletions test/tools/auth0/handlers/prompts.tests.ts
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,7 @@ describe('#prompts handler', () => {
getCustomPartial.withArgs({ prompt: 'login' }).resolves(loginPartial);
getCustomPartial.withArgs({ prompt: 'login-id' }).resolves({});
getCustomPartial.withArgs({ prompt: 'login-password' }).resolves({});
getCustomPartial.withArgs({ prompt: 'login-passwordless' }).resolves({});
getCustomPartial.withArgs({ prompt: 'signup-password' }).resolves({});
getCustomPartial.withArgs({ prompt: 'signup-id' }).resolves({});
getCustomPartial.withArgs({ prompt: 'signup' }).resolves(signupPartial);
Expand Down Expand Up @@ -293,6 +294,7 @@ describe('#prompts handler', () => {
getCustomPartial.withArgs({ prompt: 'login' }).resolves({});
getCustomPartial.withArgs({ prompt: 'login-id' }).resolves({});
getCustomPartial.withArgs({ prompt: 'login-password' }).resolves({});
getCustomPartial.withArgs({ prompt: 'login-passwordless' }).resolves({});
getCustomPartial.withArgs({ prompt: 'signup-password' }).resolves({});
getCustomPartial.withArgs({ prompt: 'signup-id' }).resolves({});
getCustomPartial.withArgs({ prompt: 'signup' }).resolves({});
Expand Down

0 comments on commit 88a7c49

Please sign in to comment.