Users accessing an application protected by Avi Load Balancer OAuth/SSO receive an HTTP 401 Unauthorized response when opening the application URL in a new browser tab while an existing OAuth login flow is still in progress in another tab.
When a user first accesses the application, Avi (Virtual Service) issues a short-lived OAuth handshake cookie, using the cookie name configured in the OAuth profile, to track the in-progress OAuth session.This cookie has a TTL of 2 minutes and is strictly valid only when returned via the OAuth Callback URI as part of the IdP redirect.
Since the Handshake Cookie is scoped to the application domain (e.g., portal.foo.bar), the browser automatically attaches it to any subsequent request to that domain — including a new tab opened by the user before login completes.
When Virtual Service receives the new tab request, it detects the Handshake Cookie on a non-callback URI and rejects it with HTTP 401. This is intentional security behavior designed to prevent OAuth handshake replay attacks. From AVI ALB's perspective, a Handshake Cookie arriving outside the callback URI is indistinguishable from a replay attack attempt, so it is rejected in both cases.
Example flow that triggers the 401:
This behavior is addressed and fixed in the below Avi releases. There is no additional configuration change required to disable or modify this enforcement beyond upgrading to a fixed version.
Fixed Version: 31.2.3, 32.x and 30.2.7
AV-268360: OAuth authentication fails with a 401 Unauthorized error if the user tries to log in across multiple tabs simultaneously.
30.2.7 Release Note
Workaround:
Complete the login fully in the first tab before opening the application in any additional tab. Once Avi issues a Session Cookie, all subsequent tabs will share the authenticated session without error.