Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug]: Library fails on Firefox [REOPEN] #1621

Open
mmarrano opened this issue Nov 30, 2022 · 7 comments
Open

[Bug]: Library fails on Firefox [REOPEN] #1621

mmarrano opened this issue Nov 30, 2022 · 7 comments
Assignees

Comments

@mmarrano
Copy link

Version

15.0.0

Please provide a link to a minimal reproduction of the bug

#1487 (comment)

Please provide the exception or error you saw

`DataError: Data provided to an operation does not meet requirements`

Steps to reproduce the behavior

Using Firefox and having our authorization provider sign keys with `kty: "EC"`

* OS: Windows 10 Pro
* Browser: Firefox
* Version: 107.0

A clear and concise description of what you expected to happen.

I added a comment to the issue linked above, that I am seeing this issue happen as well as the OP. I wanted to re-open a new issue so that it gets attention.

Additional context

Configuration:

{
      authority: this.config.config?.oidc.authority,
      redirectUrl: home,
      postLogoutRedirectUri: home,
      clientId: this.config.config?.clientId,
      scope: 'openid',
      responseType: 'id_token token',
      silentRenew: true,
      silentRenewUrl: home,
      renewTimeBeforeTokenExpiresInSeconds: 30,
      startCheckSession: true,
      logLevel: LogLevel.None,
      customParamsAuthRequest: {
        auth_method: isExternal ? '-----' : '-----',
        realm: isExternal ? '-----' : '-----',
        ttl: 1200,
        identity_method: '-----'
      },
      unauthorizedRoute: '/-----/unauthorized',
      forbiddenRoute: '/-----/unauthorized'
}
@FabianGosebrink
Copy link
Collaborator

I have the lib running in a project with firefox /keycloak, and it runs without problems. Is there any special situation, when the lib fails in FF?

@wsuerk
Copy link

wsuerk commented Feb 24, 2023

I am also seeing this issue. It is only occurring when using EC and NOT RSA. Looking through the code it seems to stem from this:

 if (agent.indexOf('firefox') > -1 && key.kty === 'EC') {
      key.alg = '';
    }

This change seems to have been made for a known issue in firefox that was has since been addressed: https://hg.mozilla.org/mozilla-central/rev/a5a2eceae613

I have confirmed that the removal of the firefox check seems to fix the issue.

@FabianGosebrink
Copy link
Collaborator

So we have to choose either to have the known issue or this issue?

@wsuerk
Copy link

wsuerk commented Feb 24, 2023

No, the issue on firefox's side has been fixed.

@FabianGosebrink
Copy link
Collaborator

So we could remove this

 if (agent.indexOf('firefox') > -1 && key.kty === 'EC') {
      key.alg = '';
    }

then, do you confirm?

@wsuerk
Copy link

wsuerk commented Feb 27, 2023

Correct, it can be removed

FabianGosebrink added a commit that referenced this issue Feb 27, 2023
@FabianGosebrink
Copy link
Collaborator

Merged. Will be in the next release.

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

No branches or pull requests

3 participants