Skip to content

Commit 7d12cac

Browse files
committed
fix: change show complete screen to has success page
1 parent 12d9e8f commit 7d12cac

File tree

3 files changed

+6
-6
lines changed

3 files changed

+6
-6
lines changed

lib/main.test.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ describe("mapLoginMethodParamsForUrl", () => {
3939
connectionId: "conn123",
4040
redirectURL: "https://example.com/",
4141
audience: "audience123",
42-
showCompleteScreen: true,
42+
hasSuccessPage: true,
4343
};
4444
const expectedOutput = {
4545
login_hint: "[email protected]",
@@ -48,7 +48,7 @@ describe("mapLoginMethodParamsForUrl", () => {
4848
redirect_uri: "https://example.com",
4949
audience: "audience123",
5050
scope: "email profile openid offline",
51-
show_complete_screen: "true",
51+
has_success_page: "true",
5252
};
5353
expect(mapLoginMethodParamsForUrl(options)).toEqual(expectedOutput);
5454
});

lib/main.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ export const mapLoginMethodParamsForUrl = (
3636
lang: options.lang,
3737
org_code: options.orgCode,
3838
org_name: options.orgName,
39-
show_complete_screen: options.showCompleteScreen?.toString(),
39+
has_success_page: options.hasSuccessPage?.toString(),
4040
};
4141

4242
Object.keys(translate).forEach(

lib/types.ts

+3-3
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ export type LoginMethodParams = Pick<
1717
| "orgName"
1818
| "connectionId"
1919
| "redirectURL"
20-
| "showCompleteScreen"
20+
| "hasSuccessPage"
2121
>;
2222

2323
export type LoginOptions = {
@@ -102,9 +102,9 @@ export type LoginOptions = {
102102
*/
103103
state?: string;
104104
/**
105-
* Whether to show the complete screen at the end of the flow, this is most useful when the callback is not a webpage.
105+
* Whether to show the success screen at the end of the flow, this is most useful when the callback is not a webpage.
106106
*/
107-
showCompleteScreen?: boolean;
107+
hasSuccessPage?: boolean;
108108
};
109109

110110
export enum IssuerRouteTypes {

0 commit comments

Comments
 (0)