bump @axa-fr/react-oidc to 6.9 to fix atob padding bug (#97)

* bump @axa-fr/react-oidc to 6.9 to fix atob padding bug

* add issuer to auth0AuthorityConfig
This commit is contained in:
Jens L
2022-10-17 23:54:21 +02:00
committed by GitHub
parent 80178f66c3
commit 957ff98cec
3 changed files with 20 additions and 15 deletions

15
package-lock.json generated
View File

@@ -9,7 +9,7 @@
"version": "0.1.0", "version": "0.1.0",
"dependencies": { "dependencies": {
"@ant-design/icons": "^4.7.0", "@ant-design/icons": "^4.7.0",
"@axa-fr/react-oidc": "^5.14.0", "@axa-fr/react-oidc": "^6.9.2",
"@headlessui/react": "^1.5.0", "@headlessui/react": "^1.5.0",
"@heroicons/react": "^1.0.4", "@heroicons/react": "^1.0.4",
"@testing-library/jest-dom": "^5.11.4", "@testing-library/jest-dom": "^5.11.4",
@@ -122,9 +122,10 @@
} }
}, },
"node_modules/@axa-fr/react-oidc": { "node_modules/@axa-fr/react-oidc": {
"version": "5.14.2", "version": "6.9.2",
"resolved": "https://registry.npmjs.org/@axa-fr/react-oidc/-/react-oidc-5.14.2.tgz", "resolved": "https://registry.npmjs.org/@axa-fr/react-oidc/-/react-oidc-6.9.2.tgz",
"integrity": "sha512-N+ssJlVtVHnsvlusMxY3zLPKCB+lGzeHIxWXUb0WY3uA7Z+jxx7A2m9W1kHbhYzHuihgA3rWIcdKsvtdkeKXwg==", "integrity": "sha512-DaAerrnl5uCN89mWIGuIEmXN2APuD1Q+060AsdT0H021BeQkvCkBq0EwjsRUMWrgKzcwWipqN/1e0jpd0QWPQw==",
"hasInstallScript": true,
"dependencies": { "dependencies": {
"@openid/appauth": "1.3.1" "@openid/appauth": "1.3.1"
}, },
@@ -16820,9 +16821,9 @@
} }
}, },
"@axa-fr/react-oidc": { "@axa-fr/react-oidc": {
"version": "5.14.2", "version": "6.9.2",
"resolved": "https://registry.npmjs.org/@axa-fr/react-oidc/-/react-oidc-5.14.2.tgz", "resolved": "https://registry.npmjs.org/@axa-fr/react-oidc/-/react-oidc-6.9.2.tgz",
"integrity": "sha512-N+ssJlVtVHnsvlusMxY3zLPKCB+lGzeHIxWXUb0WY3uA7Z+jxx7A2m9W1kHbhYzHuihgA3rWIcdKsvtdkeKXwg==", "integrity": "sha512-DaAerrnl5uCN89mWIGuIEmXN2APuD1Q+060AsdT0H021BeQkvCkBq0EwjsRUMWrgKzcwWipqN/1e0jpd0QWPQw==",
"requires": { "requires": {
"@openid/appauth": "1.3.1" "@openid/appauth": "1.3.1"
} }

View File

@@ -4,7 +4,7 @@
"private": true, "private": true,
"dependencies": { "dependencies": {
"@ant-design/icons": "^4.7.0", "@ant-design/icons": "^4.7.0",
"@axa-fr/react-oidc": "^5.14.0", "@axa-fr/react-oidc": "^6.9.2",
"@headlessui/react": "^1.5.0", "@headlessui/react": "^1.5.0",
"@heroicons/react": "^1.0.4", "@heroicons/react": "^1.0.4",
"@testing-library/jest-dom": "^5.11.4", "@testing-library/jest-dom": "^5.11.4",

View File

@@ -16,12 +16,16 @@ const config = getConfig();
// Unfortunately Auth0 https://<DOMAIN>/.well-known/openid-configuration doesn't contain end_session_endpoint that // Unfortunately Auth0 https://<DOMAIN>/.well-known/openid-configuration doesn't contain end_session_endpoint that
// is required for doing logout. Therefore, we need to hardcode the config for auth // is required for doing logout. Therefore, we need to hardcode the config for auth
const auth0AuthorityConfig: AuthorityConfiguration = { const auth0AuthorityConfig: AuthorityConfiguration = {
authorization_endpoint: new URL("authorize", config.authority).href, issuer:
token_endpoint: new URL("oauth/token", config.authority).href, config.authority.slice(-1) === "/"
revocation_endpoint: new URL("oauth/revoke", config.authority).href, ? config.authority
end_session_endpoint: new URL("v2/logout", config.authority).href, : config.authority + "/",
userinfo_endpoint: new URL("userinfo", config.authority).href, authorization_endpoint: new URL("authorize", config.authority).href,
} as AuthorityConfiguration token_endpoint: new URL("oauth/token", config.authority).href,
revocation_endpoint: new URL("oauth/revoke", config.authority).href,
end_session_endpoint: new URL("v2/logout", config.authority).href,
userinfo_endpoint: new URL("userinfo", config.authority).href,
} as AuthorityConfiguration;
const providerConfig = { const providerConfig = {
authority: config.authority, authority: config.authority,
@@ -64,4 +68,4 @@ root.render(
// If you want to start measuring performance in your app, pass a function // If you want to start measuring performance in your app, pass a function
// to log results (for example: reportWebVitals(console.log)) // to log results (for example: reportWebVitals(console.log))
// or send to an analytics endpoint. Learn more: https://bit.ly/CRA-vitals // or send to an analytics endpoint. Learn more: https://bit.ly/CRA-vitals
reportWebVitals(); reportWebVitals();