Skip to content

Use the authentication response cookie fields to search for flow cookies - #258

Merged
itaihanski merged 3 commits into
mainfrom
search-for-cookies
Sep 30, 2025
Merged

Use the authentication response cookie fields to search for flow cookies#258
itaihanski merged 3 commits into
mainfrom
search-for-cookies

Conversation

@itaihanski

@itaihanski itaihanski commented Sep 30, 2025

Copy link
Copy Markdown
Member

Related Issues

https://github.com/descope/etc/issues/12304

Description

Use the authentication response cookie fields to search for flow cookies

Must

  • Tests
  • Documentation (if applicable)

@itaihanski itaihanski self-assigned this Sep 30, 2025
Copilot AI review requested due to automatic review settings September 30, 2025 11:14

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR updates the authentication cookie search mechanism to use both URL and response cookie fields when searching for flow cookies, improving cookie discovery in authentication flows.

  • Refactored findJwtInCookies function to accept multiple cookie strings with named parameters
  • Added new cookie fields (cookieDomain and cookiePath) to JWT server responses
  • Updated authentication flow to search cookies from both the original URL and response-specified domain/path

Reviewed Changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 2 comments.

File Description
TokenTest.kt Updated test calls to use the new parameter order and added tests for multiple cookie string scenarios
TestUtils.kt Added mock cookie domain and path fields to test JWT response
Responses.kt Added cookieDomain and cookiePath fields to JwtServerResponse data class
DescopeFlowCoordinator.kt Refactored cookie search to use both URL and response cookie locations

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

Comment thread descopesdk/src/test/java/com/descope/session/TokenTest.kt Outdated
itaihanski and others added 2 commits September 30, 2025 14:16
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
@itaihanski
itaihanski enabled auto-merge (squash) September 30, 2025 14:57
@itaihanski
itaihanski merged commit f08325d into main Sep 30, 2025
9 of 10 checks passed
@itaihanski
itaihanski deleted the search-for-cookies branch September 30, 2025 17:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants