@paladen/auth
Advanced tools
| import { BaseError, BaseErrorProps } from "@paladen/errors"; | ||
| export declare class AlreadyAuthenticatedError extends BaseError { | ||
| constructor(props?: BaseErrorProps); | ||
| } |
+1
-0
| export * from "./AuthContext"; | ||
| export * from "./errors"; | ||
| export declare type AuthProps = { | ||
@@ -3,0 +4,0 @@ isAuthenticated?: boolean; |
+70
-0
@@ -280,2 +280,71 @@ 'use strict'; | ||
| var dist$1 = createCommonjsModule(function (module, exports) { | ||
| Object.defineProperty(exports, '__esModule', { | ||
| value: true | ||
| }); | ||
| function _classCallCheck(instance, Constructor) { | ||
| if (!(instance instanceof Constructor)) { | ||
| throw new TypeError("Cannot call a class as a function"); | ||
| } | ||
| } | ||
| var BaseError = function BaseError(props) { | ||
| _classCallCheck(this, BaseError); | ||
| if (props && props.message) { | ||
| this.message = props.message; | ||
| } | ||
| if (props && props.httpStatusCode) { | ||
| this.httpStatusCode = props.httpStatusCode; | ||
| } | ||
| if (props && props.fields) { | ||
| this.fields = props.fields; | ||
| } | ||
| }; | ||
| var createErrorResponseArray = function createErrorResponseArray(errors) { | ||
| return { | ||
| errors: errors.map(function (err) { | ||
| var obj = { | ||
| name: err.name, | ||
| message: err.message | ||
| }; | ||
| if (err.fields) { | ||
| obj.fields = err.fields; | ||
| } | ||
| return obj; | ||
| }) | ||
| }; | ||
| }; | ||
| exports.BaseError = BaseError; | ||
| exports.createErrorResponseArray = createErrorResponseArray; | ||
| }); | ||
| unwrapExports(dist$1); | ||
| var dist_1$1 = dist$1.BaseError; | ||
| var dist_2$1 = dist$1.createErrorResponseArray; | ||
| var AlreadyAuthenticatedError = /*#__PURE__*/function (_BaseError) { | ||
| _inherits(AlreadyAuthenticatedError, _BaseError); | ||
| function AlreadyAuthenticatedError(props) { | ||
| var _this; | ||
| _classCallCheck(this, AlreadyAuthenticatedError); | ||
| _this = _possibleConstructorReturn(this, _getPrototypeOf(AlreadyAuthenticatedError).call(this, props)); | ||
| _this.name = "AlreadyAuthenticatedError"; | ||
| return _this; | ||
| } | ||
| return AlreadyAuthenticatedError; | ||
| }(dist_1$1); | ||
| var buildSessionCookieString = function buildSessionCookieString(name, value, expiryDate) { | ||
@@ -317,2 +386,3 @@ return ["".concat(name, "=").concat(value), "path=/", "SameSite=Lax", "expires=".concat(expiryDate), "HttpOnly", process.env.NODE_ENV === "production" ? "Secure;" : null].join(";"); | ||
| exports.AlreadyAuthenticatedError = AlreadyAuthenticatedError; | ||
| exports.AuthContext = AuthContext; | ||
@@ -319,0 +389,0 @@ exports.AuthContextProvider = AuthContextProvider; |
+5
-3
| { | ||
| "name": "@paladen/auth", | ||
| "version": "0.0.77", | ||
| "version": "0.0.78", | ||
| "repository": "https://github.com/samstr/paladen", | ||
@@ -18,3 +18,4 @@ "main": "dist/index.js", | ||
| "dependencies": { | ||
| "@paladen/config": "^0.0.77", | ||
| "@paladen/config": "^0.0.78", | ||
| "@paladen/errors": "^0.0.78", | ||
| "react": "^16.13.0", | ||
@@ -25,2 +26,3 @@ "react-dom": "^16.13.0" | ||
| "@paladen/config": "^0.0.72", | ||
| "@paladen/errors": "^0.0.77", | ||
| "react": "^16.13.0", | ||
@@ -33,3 +35,3 @@ "react-dom": "^16.13.0" | ||
| }, | ||
| "gitHead": "edb04b900727b5ec73c2be89eb33b3e41343a76c" | ||
| "gitHead": "91692359d5179f024f44ccb0ee76490273ae6567" | ||
| } |
Environment variable access
Supply chain riskPackage accesses environment variables, which may be a sign of credential stuffing or data theft.
Found 1 instance in 1 package
Environment variable access
Supply chain riskPackage accesses environment variables, which may be a sign of credential stuffing or data theft.
Found 1 instance in 1 package
14567
15.1%6
20%364
18.95%8
33.33%+ Added
+ Added
+ Added
- Removed
Updated