@bufferapp/session-manager
Advanced tools
Comparing version
@@ -8,7 +8,15 @@ 'use strict'; | ||
const loginServiceUrl = exports.loginServiceUrl = ({ production }) => `https://login${production ? '' : '.local'}.buffer.com`; | ||
const loginServiceUrl = exports.loginServiceUrl = ({ production }) => { | ||
if (!process.env.SESSION_SERVICE_REDIRECT_URL) return `https://login${production ? '' : '.local'}.buffer.com`; | ||
return process.env.SESSION_SERVICE_REDIRECT_URL; | ||
}; | ||
const logoutUrl = exports.logoutUrl = ({ production }) => `${loginServiceUrl({ production })}/logout/?redirect=${currentWindowUrl()}`; | ||
// TODO: remove beta '1' version after its been removed | ||
const sessionServiceUrl = exports.sessionServiceUrl = ({ sessionVersion = '1', production }) => `http://session-service-${sessionVersion}${production ? '.core' : ':3000'}`; | ||
const sessionServiceUrl = exports.sessionServiceUrl = ({ sessionVersion = '1', production }) => { | ||
if (!process.env.SESSION_SERVICE_URL) return `http://session-service-${sessionVersion}${production ? '.core' : ':3000'}`; | ||
return process.env.SESSION_SERVICE_URL; | ||
}; |
{ | ||
"name": "@bufferapp/session-manager", | ||
"version": "0.7.1", | ||
"version": "0.7.2-beta-01", | ||
"description": "Buffer session manager", | ||
@@ -5,0 +5,0 @@ "main": "lib/index.js", |
const currentWindowUrl = () => window.location.href | ||
export const loginServiceUrl = ({ production }) => | ||
`https://login${production ? '' : '.local'}.buffer.com` | ||
export const loginServiceUrl = ({ production }) => { | ||
if (!process.env.SESSION_SERVICE_REDIRECT_URL) | ||
return `https://login${production ? '' : '.local'}.buffer.com` | ||
return process.env.SESSION_SERVICE_REDIRECT_URL | ||
} | ||
export const logoutUrl = ({ production }) => | ||
@@ -10,3 +14,9 @@ `${loginServiceUrl({ production })}/logout/?redirect=${currentWindowUrl()}` | ||
// TODO: remove beta '1' version after its been removed | ||
export const sessionServiceUrl = ({ sessionVersion = '1', production }) => | ||
`http://session-service-${sessionVersion}${production ? '.core' : ':3000'}` | ||
export const sessionServiceUrl = ({ sessionVersion = '1', production }) => { | ||
if (!process.env.SESSION_SERVICE_URL) | ||
return `http://session-service-${sessionVersion}${ | ||
production ? '.core' : ':3000' | ||
}` | ||
return process.env.SESSION_SERVICE_URL | ||
} |
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
17675
2.53%516
2.79%1
Infinity%