Skip to content

Commit 0bfbdc3

Browse files
authored
feat(clerk-js): Add /oauth/authorize-with-immediate-redirect to frontendApiRedirectPathsNoUserInput (#6579)
1 parent 4524eb5 commit 0bfbdc3

File tree

3 files changed

+8
-0
lines changed

3 files changed

+8
-0
lines changed

.changeset/shaky-foxes-doubt.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
'@clerk/clerk-js': minor
3+
---
4+
5+
Adding /oauth/authorize-with-immediate-redirect to frontendApiRedirectPathsNoUserInput

packages/clerk-js/src/utils/__tests__/url.spec.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -497,6 +497,7 @@ describe('isRedirectForFAPIInitiatedFlow(frontendAp: string, redirectUrl: string
497497
['clerk.foo.bar-53.lcl.dev', 'https://clerk.foo.bar-53.lcl.dev/oauth/authorize', true],
498498
['clerk.foo.bar-53.lcl.dev', 'https://clerk.foo.bar-53.lcl.dev/v1/verify', true],
499499
['clerk.foo.bar-53.lcl.dev', 'https://clerk.foo.bar-53.lcl.dev/v1/tickets/accept', true],
500+
['clerk.foo.bar-53.lcl.dev', 'https://clerk.foo.bar-53.lcl.dev/oauth/authorize-with-immediate-redirect', true],
500501
['clerk.foo.bar-53.lcl.dev', 'https://google.com', false],
501502
['clerk.foo.bar-53.lcl.dev', 'https://google.com/v1/verify', false],
502503
];
@@ -516,6 +517,7 @@ describe('requiresUserInput(redirectUrl: string)', () => {
516517
['https://clerk.foo.bar-53.lcl.dev/oauth/authorize', true],
517518
['https://clerk.foo.bar-53.lcl.dev/v1/verify', false],
518519
['https://clerk.foo.bar-53.lcl.dev/v1/tickets/accept', false],
520+
['https://clerk.foo.bar-53.lcl.dev/oauth/authorize-with-immediate-redirect', false],
519521
['https://google.com', false],
520522
['https://google.com/v1/verify', false],
521523
];

packages/clerk-js/src/utils/url.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -402,6 +402,7 @@ const frontendApiRedirectPathsWithUserInput: string[] = [
402402
const frontendApiRedirectPathsNoUserInput: string[] = [
403403
'/v1/verify', // magic links
404404
'/v1/tickets/accept', // ticket flow
405+
'/oauth/authorize-with-immediate-redirect', // OAuth 2 identity provider
405406
];
406407

407408
export function isRedirectForFAPIInitiatedFlow(frontendApi: string, redirectUrl: string): boolean {

0 commit comments

Comments
 (0)