Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

oidc-react

Package Overview
Dependencies
Maintainers
1
Versions
41
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

oidc-react - npm Package Compare versions

Comparing version 1.2.0 to 1.2.1

14

build/src/AuthContext.js

@@ -59,3 +59,3 @@ "use strict";

return props.userManager;
const { authority, clientId, clientSecret, redirectUri, responseType, scope, automaticSilentRenew, loadUserInfo, popupWindowFeatures, popupRedirectUri, popupWindowTarget } = props;
const { authority, clientId, clientSecret, redirectUri, postLogoutRedirectUri, responseType, scope, automaticSilentRenew, loadUserInfo, popupWindowFeatures, popupRedirectUri, popupWindowTarget, } = props;
return new oidc_client_1.UserManager({

@@ -67,3 +67,3 @@ authority,

silent_redirect_uri: redirectUri,
post_logout_redirect_uri: redirectUri,
post_logout_redirect_uri: postLogoutRedirectUri || redirectUri,
response_type: responseType || 'code',

@@ -92,3 +92,9 @@ scope: scope || 'openid',

});
const isMountedRef = react_1.useRef(true);
react_1.useEffect(() => {
return () => {
isMountedRef.current = false;
};
}, []);
react_1.useEffect(() => {
const getUser = () => __awaiter(void 0, void 0, void 0, function* () {

@@ -107,3 +113,3 @@ if (exports.hasCodeInUrl(location)) {

else {
setUserData(user);
isMountedRef.current && setUserData(user);
}

@@ -117,3 +123,3 @@ return;

const user = yield userManager.getUser();
setUserData(user);
isMountedRef.current && setUserData(user);
});

@@ -120,0 +126,0 @@ userManager.events.addUserLoaded(updateUserData);

@@ -15,2 +15,3 @@ import { UserManager, User } from 'oidc-client';

redirectUri?: string;
postLogoutRedirectUri?: string;
responseType?: string;

@@ -17,0 +18,0 @@ scope?: string;

@@ -6,2 +6,9 @@ # Changelog

## [1.2.1](https://github.com/bjerkio/oidc-react/compare/v1.2.0...v1.2.1) (2021-03-09)
### Bug Fixes
* state update on an unmounted component ([#522](https://github.com/bjerkio/oidc-react/issues/522)) ([0e873f4](https://github.com/bjerkio/oidc-react/commit/0e873f4e6ac7d14cc39f4cb5196b2a79b866da93))
# [1.2.0](https://github.com/bjerkio/oidc-react/compare/v1.1.6...v1.2.0) (2021-03-08)

@@ -8,0 +15,0 @@

{
"name": "oidc-react",
"version": "1.2.0",
"version": "1.2.1",
"private": false,

@@ -5,0 +5,0 @@ "description": "",

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc