Skip to content

Commit e9039fa

Browse files
authored
Deprecate context option on getAuthorizationUrl (#1263)
We no longer need applications' initiate login endpoints to return the `context` query parameter when getting the authorization URL. This PR deprecates that option from the `getAuthorizationUrl` and `signIn` functions and prints a message to the console when it's used. In a future release, we can remove this option entirely.
1 parent ff52533 commit e9039fa

File tree

2 files changed

+11
-0
lines changed

2 files changed

+11
-0
lines changed

src/user-management/interfaces/authorization-url-options.interface.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,10 @@ export interface AuthorizationURLOptions {
33
codeChallenge?: string;
44
codeChallengeMethod?: 'S256';
55
connectionId?: string;
6+
/**
7+
* @deprecated We previously required initiate login endpoints to return the `context`
8+
* query parameter when getting the authorization URL. This is no longer necessary.
9+
*/
610
context?: string;
711
organizationId?: string;
812
domainHint?: string;

src/user-management/user-management.ts

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1007,6 +1007,13 @@ export class UserManagement {
10071007
);
10081008
}
10091009

1010+
if (context) {
1011+
this.workos.emitWarning(
1012+
`\`context\` is deprecated. We previously required initiate login endpoints to return the
1013+
\`context\` query parameter when getting the authorization URL. This is no longer necessary.`,
1014+
);
1015+
}
1016+
10101017
const query = toQueryString({
10111018
connection_id: connectionId,
10121019
code_challenge: codeChallenge,

0 commit comments

Comments
 (0)