@auth0/auth0-react 2.2.2 → 2.2.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/auth0-react.cjs.js +6 -3
- package/dist/auth0-react.cjs.js.map +1 -1
- package/dist/auth0-react.esm.js +6 -4
- package/dist/auth0-react.esm.js.map +1 -1
- package/dist/auth0-react.js +6 -3
- package/dist/auth0-react.js.map +1 -1
- package/dist/auth0-react.min.js +1 -1
- package/dist/auth0-react.min.js.map +1 -1
- package/dist/errors.d.ts +4 -3
- package/dist/errors.d.ts.map +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.d.ts.map +1 -1
- package/package.json +1 -1
- package/src/errors.tsx +3 -5
- package/src/index.tsx +1 -0
package/dist/auth0-react.cjs.js
CHANGED
|
@@ -133,13 +133,15 @@ var Auth0Context = React.createContext(initialContext);
|
|
|
133
133
|
var OAuthError = /** @class */ (function (_super) {
|
|
134
134
|
__extends(OAuthError, _super);
|
|
135
135
|
function OAuthError(error, error_description) {
|
|
136
|
-
var _this = _super.call(this,
|
|
136
|
+
var _this = _super.call(this, error_description || error) || this;
|
|
137
|
+
_this.error = error;
|
|
138
|
+
_this.error_description = error_description;
|
|
137
139
|
// https://github.com/Microsoft/TypeScript-wiki/blob/master/Breaking-Changes.md#extending-built-ins-like-error-array-and-map-may-no-longer-work
|
|
138
140
|
Object.setPrototypeOf(_this, OAuthError.prototype);
|
|
139
141
|
return _this;
|
|
140
142
|
}
|
|
141
143
|
return OAuthError;
|
|
142
|
-
}(
|
|
144
|
+
}(Error));
|
|
143
145
|
|
|
144
146
|
var CODE_RE = /[?&]code=[^&]+/;
|
|
145
147
|
var STATE_RE = /[?&]state=[^&]+/;
|
|
@@ -222,7 +224,7 @@ var toAuth0ClientOptions = function (opts) {
|
|
|
222
224
|
deprecateRedirectUri(opts);
|
|
223
225
|
return __assign(__assign({}, opts), { auth0Client: {
|
|
224
226
|
name: 'auth0-react',
|
|
225
|
-
version: '2.2.
|
|
227
|
+
version: '2.2.3',
|
|
226
228
|
} });
|
|
227
229
|
};
|
|
228
230
|
/**
|
|
@@ -548,6 +550,7 @@ var withAuthenticationRequired = function (Component, options) {
|
|
|
548
550
|
exports.Auth0Context = Auth0Context;
|
|
549
551
|
exports.Auth0Provider = Auth0Provider;
|
|
550
552
|
exports.AuthenticationError = u;
|
|
553
|
+
exports.GenericError = d;
|
|
551
554
|
exports.InMemoryCache = x;
|
|
552
555
|
exports.LocalStorageCache = z;
|
|
553
556
|
exports.MfaRequiredError = m;
|