@bagelink/auth 1.21.40 → 1.21.42
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/callbackGate.d.ts +3 -2
- package/dist/index.cjs +1 -0
- package/dist/index.mjs +1 -0
- package/package.json +1 -1
- package/src/callbackGate.test.ts +1 -1
- package/src/callbackGate.ts +4 -2
package/dist/callbackGate.d.ts
CHANGED
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Keeps post-login navigation and logged-out 401s quiet during SSO callback.
|
|
3
|
-
* Callback, login-token, and MFA screens own their own redirect (often
|
|
4
|
-
* `location.replace`). A LOGIN → `router.push` race mounts the
|
|
3
|
+
* Callback, login, login-token, and MFA screens own their own redirect (often
|
|
4
|
+
* `location.replace` or `router.push`). A LOGIN → `router.push` race mounts the
|
|
5
|
+
* app shell early.
|
|
5
6
|
*/
|
|
6
7
|
/** Route names that perform their own post-login navigation. */
|
|
7
8
|
export declare const POST_LOGIN_OWNER_ROUTES: Set<string>;
|
package/dist/index.cjs
CHANGED
package/dist/index.mjs
CHANGED
package/package.json
CHANGED
package/src/callbackGate.test.ts
CHANGED
|
@@ -27,7 +27,7 @@ describe('SSO callback gate', () => {
|
|
|
27
27
|
expect(shouldAutoRedirectAfterLogin('Callback')).toBe(false)
|
|
28
28
|
expect(shouldAutoRedirectAfterLogin('auth-mfa')).toBe(false)
|
|
29
29
|
expect(shouldAutoRedirectAfterLogin('auth-login-token')).toBe(false)
|
|
30
|
-
expect(shouldAutoRedirectAfterLogin('auth-login')).toBe(
|
|
30
|
+
expect(shouldAutoRedirectAfterLogin('auth-login')).toBe(false)
|
|
31
31
|
})
|
|
32
32
|
})
|
|
33
33
|
|
package/src/callbackGate.ts
CHANGED
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Keeps post-login navigation and logged-out 401s quiet during SSO callback.
|
|
3
|
-
* Callback, login-token, and MFA screens own their own redirect (often
|
|
4
|
-
* `location.replace`). A LOGIN → `router.push` race mounts the
|
|
3
|
+
* Callback, login, login-token, and MFA screens own their own redirect (often
|
|
4
|
+
* `location.replace` or `router.push`). A LOGIN → `router.push` race mounts the
|
|
5
|
+
* app shell early.
|
|
5
6
|
*/
|
|
6
7
|
|
|
7
8
|
/** Route names that perform their own post-login navigation. */
|
|
@@ -9,6 +10,7 @@ export const POST_LOGIN_OWNER_ROUTES = new Set([
|
|
|
9
10
|
'auth-callback',
|
|
10
11
|
'AuthCallback',
|
|
11
12
|
'Callback', // legacy route name in some apps
|
|
13
|
+
'auth-login',
|
|
12
14
|
'auth-login-token',
|
|
13
15
|
'auth-mfa',
|
|
14
16
|
])
|