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

netlify-cms-lib-auth

Package Overview
Dependencies
Maintainers
1
Versions
30
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

netlify-cms-lib-auth - npm Package Compare versions

Comparing version 2.2.0 to 2.2.1-beta.0

8

CHANGELOG.md

@@ -6,2 +6,10 @@ # Change Log

## [2.2.1-beta.0](https://github.com/netlify/netlify-cms/tree/master/packages/netlify-cms-lib-auth/compare/netlify-cms-lib-auth@2.2.0...netlify-cms-lib-auth@2.2.1-beta.0) (2019-03-25)
**Note:** Version bump only for package netlify-cms-lib-auth
# [2.2.0](https://github.com/netlify/netlify-cms/tree/master/packages/netlify-cms-lib-auth/compare/netlify-cms-lib-auth@2.1.0...netlify-cms-lib-auth@2.2.0) (2019-03-22)

@@ -8,0 +16,0 @@

36

dist/esm/implicit-oauth.js

@@ -0,1 +1,18 @@

"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = void 0;
var _immutable = require("immutable");
var _trim = _interopRequireDefault(require("lodash/trim"));
var _trimEnd = _interopRequireDefault(require("lodash/trimEnd"));
var _v = _interopRequireDefault(require("uuid/v4"));
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; var ownKeys = Object.keys(source); if (typeof Object.getOwnPropertySymbols === 'function') { ownKeys = ownKeys.concat(Object.getOwnPropertySymbols(source).filter(function (sym) { return Object.getOwnPropertyDescriptor(source, sym).enumerable; })); } ownKeys.forEach(function (key) { _defineProperty(target, key, source[key]); }); } return target; }

@@ -9,9 +26,4 @@

import { Map } from 'immutable';
import trim from 'lodash/trim';
import trimEnd from 'lodash/trimEnd';
import uuid from 'uuid/v4';
function createNonce() {
const nonce = uuid();
const nonce = (0, _v.default)();
window.sessionStorage.setItem('netlify-cms-auth', JSON.stringify({

@@ -30,7 +42,7 @@ nonce

export default class ImplicitAuthenticator {
class ImplicitAuthenticator {
constructor() {
let config = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
const baseURL = trimEnd(config.base_url, '/');
const authEndpoint = trim(config.auth_endpoint, '/');
const baseURL = (0, _trimEnd.default)(config.base_url, '/');
const authEndpoint = (0, _trim.default)(config.auth_endpoint, '/');
this.auth_url = `${baseURL}/${authEndpoint}`;

@@ -70,3 +82,3 @@ this.appID = config.app_id;

this.clearHash();
const params = Map(hashParams.entries());
const params = (0, _immutable.Map)(hashParams.entries());
const validNonce = validateNonce(params.get('state'));

@@ -93,2 +105,4 @@

}
}
exports.default = ImplicitAuthenticator;

@@ -1,7 +0,30 @@

import NetlifyAuthenticator from "./netlify-auth";
import ImplicitAuthenticator from "./implicit-oauth";
export const NetlifyCmsLibAuth = {
NetlifyAuthenticator,
ImplicitAuthenticator
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
Object.defineProperty(exports, "NetlifyAuthenticator", {
enumerable: true,
get: function get() {
return _netlifyAuth.default;
}
});
Object.defineProperty(exports, "ImplicitAuthenticator", {
enumerable: true,
get: function get() {
return _implicitOauth.default;
}
});
exports.NetlifyCmsLibAuth = void 0;
var _netlifyAuth = _interopRequireDefault(require("./netlify-auth"));
var _implicitOauth = _interopRequireDefault(require("./implicit-oauth"));
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
const NetlifyCmsLibAuth = {
NetlifyAuthenticator: _netlifyAuth.default,
ImplicitAuthenticator: _implicitOauth.default
};
export { NetlifyAuthenticator, ImplicitAuthenticator };
exports.NetlifyCmsLibAuth = NetlifyCmsLibAuth;

@@ -1,3 +0,14 @@

import trim from 'lodash/trim';
import trimEnd from 'lodash/trimEnd';
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = void 0;
var _trim = _interopRequireDefault(require("lodash/trim"));
var _trimEnd = _interopRequireDefault(require("lodash/trimEnd"));
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
const NETLIFY_API = 'https://api.netlify.com';

@@ -40,4 +51,4 @@ const AUTH_ENDPOINT = 'auth';

this.site_id = config.site_id || null;
this.base_url = trimEnd(config.base_url, '/') || NETLIFY_API;
this.auth_endpoint = trim(config.auth_endpoint, '/') || AUTH_ENDPOINT;
this.base_url = (0, _trimEnd.default)(config.base_url, '/') || NETLIFY_API;
this.auth_endpoint = (0, _trim.default)(config.auth_endpoint, '/') || AUTH_ENDPOINT;
}

@@ -166,2 +177,3 @@

export default Authenticator;
var _default = Authenticator;
exports.default = _default;
{
"name": "netlify-cms-lib-auth",
"description": "Shared authentication functionality for Netlify CMS.",
"version": "2.2.0",
"version": "2.2.1-beta.0",
"repository": "https://github.com/netlify/netlify-cms/tree/master/packages/netlify-cms-lib-auth",

@@ -19,4 +19,3 @@ "bugs": "https://github.com/netlify/netlify-cms/issues",

"scripts": {
"watch": "webpack -w",
"develop": "npm run watch",
"develop": "yarn build:esm --watch",
"build": "cross-env NODE_ENV=production webpack",

@@ -30,3 +29,3 @@ "build:esm": "cross-env NODE_ENV=esm babel src --out-dir dist/esm --ignore src/**/__tests__/* --root-mode upward"

},
"gitHead": "adfdf7bc18921020d86cf91411a2f6a1f03ef7ba"
"gitHead": "c5411bc580c7c2403f6fb8b4ad4b308c6b898c05"
}
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