Conversation
… new tests Add register_via_resource_server_pkce_flow and login_via_resource_server_pkce_flow commands to the helper commands package for reuse across E2E tests. Refactor ExampleResourceServer.cy.ts to use the new commands and add two new tests: logout-then-login via PKCE, and already-authenticated redirect from /auth/login. https://claude.ai/code/session_01Rz2N38ZQkqZUyATUAkcoDA
|
The latest updates on your projects. Learn more about Vercel for GitHub. |
…er session After registering via PKCE and logging out of the auth server, the resource server may still have valid refresh token cookies. The useStartLoginOauthPKCEFlow hook detects this and redirects to /account instead of starting the PKCE flow. Clearing all cookies ensures a clean unauthenticated state. https://claude.ai/code/session_01Rz2N38ZQkqZUyATUAkcoDA
…ogin PKCE flow In development/test environments, the resource server stores refresh tokens in localStorage (not HTTP-only cookies) since doesSupportHttpOnlyRefreshToken() returns false for non-auth-server apps in dev/test. Clearing cookies alone wasn't sufficient to reset the resource server's auth state. https://claude.ai/code/session_01Rz2N38ZQkqZUyATUAkcoDA
cy.clearAllLocalStorage() runs in the auth server origin context and doesn't effectively clear cross-origin storage. Move localStorage.clear() inside the cy.origin() block so it executes in the resource server's origin where the refresh tokens are actually stored. https://claude.ai/code/session_01Rz2N38ZQkqZUyATUAkcoDA
After login with prior consent, the auth server redirects directly to the
resource server (skipping the consent screen). The previous cy.url() check
ran against the auth server origin but the browser had already navigated
to the resource server, causing a cross-origin error. Use cy.get("body")
to check for consent text synchronously instead, which works regardless
of whether the redirect has started.
https://claude.ai/code/session_01Rz2N38ZQkqZUyATUAkcoDA
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Add register_via_resource_server_pkce_flow and login_via_resource_server_pkce_flow
commands to the helper commands package for reuse across E2E tests. Refactor
ExampleResourceServer.cy.ts to use the new commands and add two new tests:
logout-then-login via PKCE, and already-authenticated redirect from /auth/login.
https://claude.ai/code/session_01Rz2N38ZQkqZUyATUAkcoDA