Skip to content

Commit

Permalink
fix(OidcProvider): missing removeEventSubscription (#742)
Browse files Browse the repository at this point in the history
  • Loading branch information
guillaume-chervet authored Mar 31, 2022
1 parent e30289c commit f9b54ef
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 4 deletions.
2 changes: 1 addition & 1 deletion packages/context/src/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ function App() {
<nav className="navbar navbar-expand-lg navbar-dark bg-primary">
<a className="navbar-brand" href="/">@axa-fr/react-oidc-context</a>
<button className="navbar-toggler" type="button" onClick={() => setShow(!show)} data-toggle="collapse" data-target="#navbarNav" aria-controls="navbarNav" aria-expanded="false" aria-label="Toggle navigation">
<span className="navbar-toggler-icon"></span>
<span className="navbar-toggler-icon"/>
</button>
<div style={show ? { display: "block" } : { display: 'none' }} className="collapse navbar-collapse" id="navbarNav">
<ul className="navbar-nav">
Expand Down
6 changes: 3 additions & 3 deletions packages/context/src/configurations.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
export const configurationIdentityServer = {
client_id: 'interactive.public.short', // interactive.public.short
redirect_uri: window.location.origin+'/authentication/callback', // http://localhost:4200/authentication/callback
client_id: 'interactive.public.short',
redirect_uri: window.location.origin+'/authentication/callback',
silent_redirect_uri: window.location.origin+'/authentication/silent-callback',
scope: 'openid profile email api offline_access',
authority: 'https://demo.duendesoftware.com',
Expand All @@ -11,7 +11,7 @@ export const configurationIdentityServer = {

export const configurationAuth0 = {
client_id: 'xGZxEAJhzlkuQUlWl90y1ntIX-0UDWHx',
redirect_uri: window.location.origin+'/callback', // http://localhost:4200/callback
redirect_uri: window.location.origin+'/callback',
scope: 'openid profile email api offline_access',
authority: 'https://kdhttps.auth0.com',
refresh_time_before_tokens_expiration_in_second: 70,
Expand Down
1 change: 1 addition & 0 deletions packages/context/src/oidc/OidcProvider.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,7 @@ sessionLostComponent=SessionLost }) => {
setLoading(false);
}
return () => {
oidc.removeEventSubscription(subscriptionId);
isMounted = false;
}
}, [configuration, configurationName]);
Expand Down

0 comments on commit f9b54ef

Please sign in to comment.