Socket
Socket
Sign inDemoInstall

oidc-react

Package Overview
Dependencies
4
Maintainers
1
Versions
39
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 1.0.0-alpha.5 to 1.0.0-alpha.6

7

build/src/AuthContext.d.ts

@@ -7,2 +7,5 @@ import React, { FC } from 'react';

}
export interface AuthProviderSignOutProps {
signoutRedirect?: boolean | unknown;
}
export interface AuthProviderProps {

@@ -19,7 +22,7 @@ userManager?: UserManager;

onSignIn?: (userData: User | null) => Promise<void> | void;
onSignOut?: () => Promise<void> | void;
onSignOut?: (options?: AuthProviderSignOutProps) => Promise<void> | void;
}
export interface AuthContextProps {
signIn: () => void;
signOut: () => void;
signOut: (options?: AuthProviderSignOutProps) => void;
userData?: User | null;

@@ -26,0 +29,0 @@ }

"use strict";
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
}) : (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
o[k2] = m[k];
}));
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
Object.defineProperty(o, "default", { enumerable: true, value: v });
}) : function(o, v) {
o["default"] = v;
});
var __importStar = (this && this.__importStar) || function (mod) {
if (mod && mod.__esModule) return mod;
var result = {};
if (mod != null) for (var k in mod) if (Object.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
__setModuleDefault(result, mod);
return result;
};
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {

@@ -11,10 +30,4 @@ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }

};
var __importStar = (this && this.__importStar) || function (mod) {
if (mod && mod.__esModule) return mod;
var result = {};
if (mod != null) for (var k in mod) if (Object.hasOwnProperty.call(mod, k)) result[k] = mod[k];
result["default"] = mod;
return result;
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.AuthProvider = exports.AuthContext = void 0;
const react_1 = __importStar(require("react"));

@@ -81,4 +94,14 @@ const oidc_client_1 = require("oidc-client");

signIn,
signOut: () => __awaiter(void 0, void 0, void 0, function* () {
yield userManager.removeUser();
signOut: (options) => __awaiter(void 0, void 0, void 0, function* () {
if (options && (options === null || options === void 0 ? void 0 : options.signoutRedirect)) {
if (typeof options.signoutRedirect === 'object') {
yield userManager.signoutRedirect(options.signoutRedirect);
}
else {
yield userManager.signoutRedirect();
}
}
else {
yield userManager.removeUser();
}
setUserData(null);

@@ -85,0 +108,0 @@ onSignOut && onSignOut();

"use strict";
function __export(m) {
for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p];
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
}) : (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
o[k2] = m[k];
}));
var __exportStar = (this && this.__exportStar) || function(m, exports) {
for (var p in m) if (p !== "default" && !exports.hasOwnProperty(p)) __createBinding(exports, m, p);
}
Object.defineProperty(exports, "__esModule", { value: true });
__export(require("./AuthContext"));
__export(require("./useAuth"));
__export(require("./withAuth"));
__exportStar(require("./AuthContext"), exports);
__exportStar(require("./useAuth"), exports);
__exportStar(require("./withAuth"), exports);
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.useAuth = void 0;
const react_1 = require("react");

@@ -4,0 +5,0 @@ const AuthContext_1 = require("./AuthContext");

@@ -6,2 +6,3 @@ "use strict";

Object.defineProperty(exports, "__esModule", { value: true });
exports.withAuth = void 0;
const useAuth_1 = require("./useAuth");

@@ -8,0 +9,0 @@ const react_1 = __importDefault(require("react"));

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

# [1.0.0-alpha.6](https://github.com/bjerkio/oidc-react/compare/v1.0.0-alpha.5...v1.0.0-alpha.6) (2020-05-15)
### Features
* add option to use signoutRedirect ([9ca3ada](https://github.com/bjerkio/oidc-react/commit/9ca3ada0e2ef1fdba81397ec2044928cc5844a87))
# [1.0.0-alpha.5](https://github.com/bjerkio/oidc-react/compare/v1.0.0-alpha.4...v1.0.0-alpha.5) (2020-04-21)

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

{
"name": "oidc-react",
"version": "1.0.0-alpha.5",
"version": "1.0.0-alpha.6",
"private": false,

@@ -28,3 +28,2 @@ "description": "",

"devDependencies": {
"@jedmao/semantic-release-npm-github-config": "^1.0.9",
"@testing-library/jest-dom": "^5.4.0",

@@ -31,0 +30,0 @@ "@testing-library/react": "^10.0.2",

SocketSocket SOC 2 Logo

Product

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

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc