Socket
Socket
Sign inDemoInstall

gitlab-auth

Package Overview
Dependencies
32
Maintainers
1
Versions
15
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 0.1.5 to 0.1.6

16

build/src/GitlabAuth.js

@@ -23,4 +23,4 @@ "use strict";

// Remove oauth info from Querystring
const cleanup = () => {
window.history.replaceState({}, window.document.title, window.location.origin);
const cleanup = (uri) => {
window.history.replaceState({}, window.document.title, (uri) ? uri : window.location.href.replace(/\?.*/, ""));
};

@@ -43,3 +43,6 @@ // Gitlab Auth context with gitlab api setup

return (react_1.default.createElement(react_1.default.Fragment, null,
react_1.default.createElement(GitlabAuthContext_1.GitlabAuthContext.Provider, { value: gitlabApi }, props.children)));
react_1.default.createElement(GitlabAuthContext_1.GitlabAuthContext.Provider, { value: gitlabApi },
react_1.default.createElement(react_1.default.Fragment, null,
react_1.default.createElement("a", { href: process.env.PUBLIC_URL + "/logout", onClick: () => auth.signOut(), title: "cancel sign-in" }, "Log Me Out!"),
props.children))));
};

@@ -68,4 +71,7 @@ const GitlabAuth = (_a) => {

});
return (react_1.default.createElement(oidc_react_1.AuthProvider, { userManager: userManager, onSignIn: () => {
cleanup();
return (react_1.default.createElement(oidc_react_1.AuthProvider, { userManager: userManager, onBeforeSignIn: () => {
localStorage.setItem("gitlab-auth-preauthuri", window.location.href);
}, onSignIn: () => {
cleanup(localStorage.getItem("gitlab-auth-preauthuri"));
localStorage.removeItem("gitlab-auth-preauthuri");
} },

@@ -72,0 +78,0 @@ react_1.default.createElement(GitlabAuthContextMaker, { host: host }, children)));

{
"name": "gitlab-auth",
"version": "0.1.5",
"version": "0.1.6",
"description": "GitLab authorized API application Context",

@@ -5,0 +5,0 @@ "main": "build/src/index.js",

SocketSocket SOC 2 Logo

Product

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

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc