Skip to content

newProvider error comparing issuerUrl to provider.issuer does not ignore trailing / character #442

@NICE-jason-andersen

Description

@NICE-jason-andersen

During the processing of the NewProvider(context, string) function a comparison is made between the issuerUrl passed into the function against the issuer URL retrieved from the /.well-known/openid-configuration (line 235 in current main code). Earlier, when the wellKnown variable is created (line 209), a trailing / in the string is ignored when concatenating the URL information together. However, when making the comparison on line 235, a trailing / is not ignored.

Ex:
issuerUrl = "https://www.myoidcprovider.com/"
Provider returned issuer = "https://www.myoidcprovider.com"

outcome - The below error message
oidc: issuer did not match the issuer returned by provider, expected "https://www.myoidcprovider.com/" got "https://www.myoidcprovider.com"

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions