Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Release 1.1.4 #92

Merged
merged 5 commits into from Mar 26, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
14 changes: 12 additions & 2 deletions CHANGELOG.md
Expand Up @@ -3,12 +3,22 @@
The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/)
and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html).

## [1.1.4] - 2018-03-26

### Added

- Add polyfill for localStorage so that NLX works in browsers that don't support it
(including Android Webviews)

## [1.1.3] - 2018-03-22

- Remove `prompt` support for autologin as it gets forwarded to Social providers in some cases, which may fail the entire login process.

## [1.1.2] - 2018-03-21

## Changed
### Changed

- Uses Auth0js v9.3.3
- Remove `prompt` support for autologin as it gets forwarded to Social providers in some cases, which may fail the entire login process.

## [1.1.1] - 2018-03-15

Expand Down
2 changes: 1 addition & 1 deletion package.json
@@ -1,6 +1,6 @@
{
"name": "lock",
"version": "1.1.3",
"version": "1.1.4",
"description": "The front-end for Mozilla's Auth0 Lock",
"main": "index.js",
"scripts": {
Expand Down
2 changes: 1 addition & 1 deletion src/html/index.html
Expand Up @@ -15,7 +15,7 @@

This is the custom Mozilla Login Experience, designed and built by Mozilla's IAM Project.

Version: 1.1.3
Version: 1.1.4
Changelog: https://github.com/mozilla-iam/auth0-custom-lock/blob/master/CHANGELOG.md

These are the variables we are using:
Expand Down
75 changes: 74 additions & 1 deletion src/js/polyfills/polyfill.js
Expand Up @@ -71,7 +71,80 @@ module.exports = function() {
return null;
};
}
};

// localStorage (from MDN:
// https://developer.mozilla.org/en-US/docs/Web/API/Storage/LocalStorage)
if (!window.localStorage) {
Object.defineProperty(window, "localStorage", new (function () {
var aKeys = [], oStorage = {};
Object.defineProperty(oStorage, "getItem", {
value: function (sKey) { return sKey ? this[sKey] : null; },
writable: false,
configurable: false,
enumerable: false
});
Object.defineProperty(oStorage, "key", {
value: function (nKeyId) { return aKeys[nKeyId]; },
writable: false,
configurable: false,
enumerable: false
});
Object.defineProperty(oStorage, "setItem", {
value: function (sKey, sValue) {
if(!sKey) { return; }
document.cookie = escape(sKey) + "=" + escape(sValue) + "; expires=Tue, 19 Jan 2038 03:14:07 GMT; path=/";
},
writable: false,
configurable: false,
enumerable: false
});
Object.defineProperty(oStorage, "length", {
get: function () { return aKeys.length; },
configurable: false,
enumerable: false
});
Object.defineProperty(oStorage, "removeItem", {
value: function (sKey) {
if(!sKey) { return; }
document.cookie = escape(sKey) + "=; expires=Thu, 01 Jan 1970 00:00:00 GMT; path=/";
},
writable: false,
configurable: false,
enumerable: false
});
Object.defineProperty(oStorage, "clear", {
value: function () {
if(!aKeys.length) { return; }
for (var sKey in aKeys) {
document.cookie = escape(sKey) + "=; expires=Thu, 01 Jan 1970 00:00:00 GMT; path=/";
}
},
writable: false,
configurable: false,
enumerable: false
});
this.get = function () {
var iThisIndx;
for (var sKey in oStorage) {
iThisIndx = aKeys.indexOf(sKey);
if (iThisIndx === -1) { oStorage.setItem(sKey, oStorage[sKey]); }
else { aKeys.splice(iThisIndx, 1); }
delete oStorage[sKey];
}
for (aKeys; aKeys.length > 0; aKeys.splice(0, 1)) { oStorage.removeItem(aKeys[0]); }
for (var aCouple, iKey, nIdx = 0, aCouples = document.cookie.split(/\s*;\s*/); nIdx < aCouples.length; nIdx++) {
aCouple = aCouples[nIdx].split(/\s*=\s*/);
if (aCouple.length > 1) {
oStorage[iKey = unescape(aCouple[0])] = unescape(aCouple[1]);
aKeys.push(iKey);
}
}
return oStorage;
};
this.configurable = false;
this.enumerable = true;
})());
}};

/*
* Copyright 2015 Google Inc. All rights reserved.
Expand Down
1 change: 1 addition & 0 deletions src/scss/components/_card.scss
Expand Up @@ -21,6 +21,7 @@
text-transform: capitalize;
padding-left: 2.125em;
position: relative;
min-height: 1.5em;

svg {
width: 1.5em;
Expand Down