Skip to content

Commit

Permalink
feat: Add support for templateId in LoginOptions and SignUpOptions (#827
Browse files Browse the repository at this point in the history
)
  • Loading branch information
shilgapira authored Oct 22, 2024
1 parent 72421c6 commit 5c0a591
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 0 deletions.
2 changes: 2 additions & 0 deletions packages/sdks/core-js-sdk/src/sdk/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,7 @@ export type LoginOptions = {
stepup?: boolean;
mfa?: boolean;
customClaims?: Record<string, any>;
templateId?: string;
templateOptions?: TemplateOptions;
};

Expand All @@ -115,6 +116,7 @@ export type AccessKeyLoginOptions = {
/** Sign Up options to be added to the different authentication methods */
export type SignUpOptions = {
customClaims?: Record<string, any>;
templateId?: string;
templateOptions?: TemplateOptions;
};

Expand Down
2 changes: 2 additions & 0 deletions packages/sdks/core-js-sdk/test/sdk/enchantedLink.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ describe('Enchanted Link', () => {
name: 'John Doe',
},
{
templateId: 'bar',
templateOptions: {
ble: 'blue',
},
Expand All @@ -61,6 +62,7 @@ describe('Enchanted Link', () => {
URI: 'http://some.thing.com',
user: { name: 'John Doe' },
loginOptions: {
templateId: 'bar',
templateOptions: {
ble: 'blue',
},
Expand Down
2 changes: 2 additions & 0 deletions packages/sdks/core-js-sdk/test/sdk/otp.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -162,6 +162,7 @@ describe('otp', () => {

it('should send the correct request with sign up options', () => {
sdk.otp.signUpOrIn.email('loginId', {
templateId: 'foo',
templateOptions: {
ble: 'blue',
},
Expand All @@ -171,6 +172,7 @@ describe('otp', () => {
{
loginId: 'loginId',
loginOptions: {
templateId: 'foo',
templateOptions: {
ble: 'blue',
},
Expand Down

0 comments on commit 5c0a591

Please sign in to comment.