[Bug]: Library Fails on Firefox
What Version of the library are you using? 13.1.0
Describe the bug When I'm initiating my Angular app from Firefox browser i'm receiving an console error: DataError: Data provided to an operation does not meet requirements from token-validation.service.ts validateSignatureIdToken() method. With the App works fine on other browsers Chrome, Edge, And Brave browsers.
After building the library locally and debug, saw this commit which set's the JsonWebKey.alg property to null (when the browser agent is Firefox and the Signing Key using is EC), which causes the issue. Removed it and build the library locally, and the firefox failure gone.
Not sure what's the purpose of that condition which requires setting JsonWebKey.alg to null for that specific scenario.
To Reproduce
- Using IdentityProvider which uses ES256 (Eliptic Curve) Signing Algorithm for Tokens.
- Using Firefox Browser to open the client app which uses angular-auth-oidc-client library.
Expected behavior Libray should works on Firefox browser.
Screenshots

Desktop (please complete the following information):
- OS: Windows 10 Pro
- Browser Firefox
- Version 102.0.1
Additional context
Configuration:
{
configId: environment.idp.clientId,
authority: environment.idp.authority,
redirectUrl: window.location.origin + '/sign-in',
postLogoutRedirectUri: window.location.origin + '/sign-out',
clientId: environment.idp.clientId,
scope: environment.idp.scope,
responseType: 'code',
silentRenew: true,
silentRenewTimeoutInSeconds: 60 * 1440, // 1 day
useRefreshToken: true,
enableIdTokenExpiredValidationInRenew: false,
renewTimeBeforeTokenExpiresInSeconds: 150,
tokenRefreshInSeconds: 30,
logLevel: LogLevel.Debug,
autoUserInfo: true,
secureRoutes: [environment.baseUrl],
}
Debug output - Firefox
[DEBUG] *redacted client_id* - Working with config '*redacted client_id*' using https://localhost:8000 angular-auth-oidc-client.mjs:160:20
[DEBUG] *redacted client_id* - currentUrl to check auth with: http://localhost:4200/sign-in?code=D5A9F830FCF8401B598B76355…MVdkPFm0sc1fGKhlVNjbdSFdBJU.D9249FD8B38DD865E41274030B30B615 angular-auth-oidc-client.mjs:157:20
[DEBUG] *redacted client_id* - running validation for callback http://localhost:4200/sign-in?code=D5A9F830FCF8401B598B76355…MVdkPFm0sc1fGKhlVNjbdSFdBJU.D9249FD8B38DD865E41274030B30B615 angular-auth-oidc-client.mjs:157:20
[DEBUG] *redacted client_id* - AuthResult '{
"id_token": "*redacted id_token*",
"access_token": "*redacted access_token*",
"expires_in": 1800,
"token_type": "Bearer",
"refresh_token": "*redacted refresh_token*",
"scope": "*redacted scope*",
"state": "2f1ab4ba969b32081ca0ec0e823461f82a3FmuTYX",
"session_state": "GbDG06XwOoHEn5-CMVdkPFm0sc1fGKhlVNjbdSFdBJU.D9249FD8B38DD865E41274030B30B615"
}'.
AuthCallback created, begin token validation angular-auth-oidc-client.mjs:160:20
[DEBUG] *redacted client_id* - Getting signinkeys from https://localhost:8000/.well-known/openid-configuration/jwks angular-auth-oidc-client.mjs:157:20
[ERROR] *redacted client_id* - DataError: Data provided to an operation does not meet requirements angular-auth-oidc-client.mjs:196:20
ERROR Error: Uncaught (in promise): Error: Cannot match any routes. URL Segment: 'unauthorized'
noMatchError@http://localhost:4200/vendor.js:141905:12
apply/<@http://localhost:4200/vendor.js:141883:20
catchError/</innerSub<@http://localhost:4200/vendor.js:2808:94
OperatorSubscriber/this._error<@http://localhost:4200/vendor.js:2671:28
error@http://localhost:4200/vendor.js:1625:18
_error@http://localhost:4200/vendor.js:1649:30
error@http://localhost:4200/vendor.js:1625:18
_error@http://localhost:4200/vendor.js:1649:30
error@http://localhost:4200/vendor.js:1625:18
_error@http://localhost:4200/vendor.js:1649:30
error@http://localhost:4200/vendor.js:1625:18
_error@http://localhost:4200/vendor.js:1649:30
error@http://localhost:4200/vendor.js:1625:18
_error@http://localhost:4200/vendor.js:1649:30
error@http://localhost:4200/vendor.js:1625:18
_error@http://localhost:4200/vendor.js:1649:30
error@http://localhost:4200/vendor.js:1625:18
_error@http://localhost:4200/vendor.js:1649:30
error@http://localhost:4200/vendor.js:1625:18
init@http://localhost:4200/vendor.js:2575:45
_trySubscribe@http://localhost:4200/vendor.js:1258:25
subscribe/<@http://localhost:4200/vendor.js:1252:30
errorContext@http://localhost:4200/vendor.js:5350:9
subscribe@http://localhost:4200/vendor.js:1243:73
catchError/<@http://localhost:4200/vendor.js:2821:27
operate/</<@http://localhost:4200/vendor.js:5654:28
subscribe/<@http://localhost:4200/vendor.js:1247:30
errorContext@http://localhost:4200/vendor.js:5350:9
subscribe@http://localhost:4200/vendor.js:1243:73
map/<@http://localhost:4200/vendor.js:3221:16