New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@britannica/cam-utils

Package Overview
Dependencies
Maintainers
4
Versions
47
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@britannica/cam-utils - npm Package Compare versions

Comparing version 2.0.0 to 2.1.0

7

CHANGELOG.md

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

## [2.1.0](https://github.com/britannica/cam-utils/compare/v2.0.0...v2.1.0) (2020-03-10)
### Features
- Add `clearRedirectUrl` method ([7e656fe](https://github.com/britannica/cam-utils/commit/7e656fea3d40955a63a945da6289d51944d6827c))
- Throw error when environment is not recognized ([da602e4](https://github.com/britannica/cam-utils/commit/da602e4a761114daff033673f655aef55914196a))
## [2.0.0](https://github.com/britannica/cam-utils/compare/v1.1.0...v2.0.0) (2020-03-10)

@@ -7,0 +14,0 @@

@@ -52,2 +52,6 @@ 'use strict';

) {
if (!Object.values(Environment).includes(env)) {
throw new Error(`Unknown environment: ${env}`);
}
return {

@@ -88,2 +92,11 @@ ...authConfigurations[env],

/**
* Clear the redirect url for the given cookie type
* @param {string} type
*/
function clearRedirectUrl(type) {
Cookies.remove(type, { domain: CAM_COOKIE_DOMAIN });
}
// Heavy-handed sign out function

@@ -107,4 +120,5 @@

exports.clearAuthCookies = clearAuthCookies;
exports.clearRedirectUrl = clearRedirectUrl;
exports.getAuthConfiguration = getAuthConfiguration;
exports.getRedirectUrl = getRedirectUrl;
exports.setRedirectUrl = setRedirectUrl;

15

dist/cam-utils.esm.js

@@ -46,2 +46,6 @@ import Cookies from 'js-cookie';

) {
if (!Object.values(Environment).includes(env)) {
throw new Error(`Unknown environment: ${env}`);
}
return {

@@ -82,2 +86,11 @@ ...authConfigurations[env],

/**
* Clear the redirect url for the given cookie type
* @param {string} type
*/
function clearRedirectUrl(type) {
Cookies.remove(type, { domain: CAM_COOKIE_DOMAIN });
}
// Heavy-handed sign out function

@@ -95,2 +108,2 @@

export { CAM_COOKIE_DOMAIN, CAM_DEFAULT_EXPIRATION_DAYS, CAM_LOGIN_REDIRECT_URL_COOKIE, CAM_SIGN_UP_REDIRECT_URL_COOKIE, Environment, clearAuthCookies, getAuthConfiguration, getRedirectUrl, setRedirectUrl };
export { CAM_COOKIE_DOMAIN, CAM_DEFAULT_EXPIRATION_DAYS, CAM_LOGIN_REDIRECT_URL_COOKIE, CAM_SIGN_UP_REDIRECT_URL_COOKIE, Environment, clearAuthCookies, clearRedirectUrl, getAuthConfiguration, getRedirectUrl, setRedirectUrl };

@@ -209,2 +209,6 @@ (function (global, factory) {

) {
if (!Object.values(Environment).includes(env)) {
throw new Error(`Unknown environment: ${env}`);
}
return {

@@ -245,2 +249,11 @@ ...authConfigurations[env],

/**
* Clear the redirect url for the given cookie type
* @param {string} type
*/
function clearRedirectUrl(type) {
js_cookie.remove(type, { domain: CAM_COOKIE_DOMAIN });
}
// Heavy-handed sign out function

@@ -264,2 +277,3 @@

exports.clearAuthCookies = clearAuthCookies;
exports.clearRedirectUrl = clearRedirectUrl;
exports.getAuthConfiguration = getAuthConfiguration;

@@ -266,0 +280,0 @@ exports.getRedirectUrl = getRedirectUrl;

2

package.json
{
"name": "@britannica/cam-utils",
"version": "2.0.0",
"version": "2.1.0",
"description": "Consumer Account Management (CAM) auth configuration and utilities",

@@ -5,0 +5,0 @@ "repository": "git://github.com/britannica/cam-utils.git",

@@ -46,2 +46,6 @@ import Cookies from 'js-cookie';

) {
if (!Object.values(Environment).includes(env)) {
throw new Error(`Unknown environment: ${env}`);
}
return {

@@ -82,2 +86,11 @@ ...authConfigurations[env],

/**
* Clear the redirect url for the given cookie type
* @param {string} type
*/
export function clearRedirectUrl(type) {
Cookies.remove(type, { domain: CAM_COOKIE_DOMAIN });
}
// Heavy-handed sign out function

@@ -84,0 +97,0 @@

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