Skip to content

Ensure rpId property is checked for Authentication requests - #240

Merged
AlexNachbaur merged 2 commits into
masterfrom
OKTA-968279-PasskeyUpdates
Jul 2, 2025
Merged

Ensure rpId property is checked for Authentication requests#240
AlexNachbaur merged 2 commits into
masterfrom
OKTA-968279-PasskeyUpdates

Conversation

@AlexNachbaur

Copy link
Copy Markdown
Contributor

No description provided.

Copilot AI review requested due to automatic review settings July 2, 2025 17:38

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

Adds support for reading the top-level rpId property for authentication requests and includes a suite of unit tests covering all identifier-selection paths.

  • Introduce a check for json["rpId"] in String.relyingPartyIssuer
  • Supply new tests for explicit rpId, U2F params, extensions, issuer fallback, and invalid URL cases

Reviewed Changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.

File Description
Tests/OktaIdxAuthTests/RelyingParthIdentifierTests.swift Added tests for each relying-party identifier scenario
Sources/OktaIdxAuth/Internal/Extensions/URL+WebAuthnExtensions.swift Added branch to return root rpId for authentication
Comments suppressed due to low confidence (2)

Tests/OktaIdxAuthTests/RelyingParthIdentifierTests.swift:21

  • [nitpick] The test name testExplicitChallengeIdentifier is ambiguous; consider renaming to testExplicitRegistrationIdentifier or testExplicitRelyingPartyIdFromRP for clarity.
    func testExplicitChallengeIdentifier() throws {

Tests/OktaIdxAuthTests/RelyingParthIdentifierTests.swift:36

  • Consider adding a test where both rpId and u2fParams are present to verify that rpId takes precedence over u2fParams as implemented.
    func testExplicitAuthenticationIdentifier() throws {

Comment thread Tests/OktaIdxAuthTests/RelyingParthIdentifierTests.swift Outdated
@AlexNachbaur
AlexNachbaur merged commit 52ecf91 into master Jul 2, 2025
21 checks passed
@AlexNachbaur
AlexNachbaur deleted the OKTA-968279-PasskeyUpdates branch July 2, 2025 21:58
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