@genezio/auth
Advanced tools
Comparing version 2.0.15-dev to 2.0.16-dev
@@ -25,2 +25,3 @@ /** | ||
private storage; | ||
private serverSide; | ||
/** | ||
@@ -33,2 +34,9 @@ * @method getInstance | ||
/** | ||
* @method setServerSide | ||
* @description Method that sets the serverSide value that will be used determine if the request is coming from the server or from the client. | ||
* @param {Storage} serverSide - The boolean that will be used determine if the request is coming from the server or from the client. | ||
* @returns {void} | ||
*/ | ||
setServerSide(serverSide: boolean): void; | ||
/** | ||
* @method setStorage | ||
@@ -35,0 +43,0 @@ * @description Method that sets the storage that will be used to store the token. |
@@ -68,2 +68,3 @@ "use strict"; | ||
this.storage = null; | ||
this.serverSide = false; | ||
} | ||
@@ -89,2 +90,11 @@ /** | ||
/** | ||
* @method setServerSide | ||
* @description Method that sets the serverSide value that will be used determine if the request is coming from the server or from the client. | ||
* @param {Storage} serverSide - The boolean that will be used determine if the request is coming from the server or from the client. | ||
* @returns {void} | ||
*/ | ||
AuthService.prototype.setServerSide = function (serverSide) { | ||
this.serverSide = serverSide; | ||
}; | ||
/** | ||
* @method setStorage | ||
@@ -148,3 +158,3 @@ * @description Method that sets the storage that will be used to store the token. | ||
if (!this.remote) { | ||
if (process.env.LOGGED_IN_LOCAL === "false") { | ||
if (this.serverSide) { | ||
throw new Error(AuthService.notLoggedInErrorMessage); | ||
@@ -180,3 +190,3 @@ } | ||
if (!this.remote || !this.storage) { | ||
if (process.env.LOGGED_IN_LOCAL === "false") { | ||
if (this.serverSide) { | ||
throw new Error(AuthService.notLoggedInErrorMessage); | ||
@@ -210,3 +220,3 @@ } | ||
if (!this.remote) { | ||
if (process.env.LOGGED_IN_LOCAL === "false") { | ||
if (this.serverSide) { | ||
throw new Error(AuthService.notLoggedInErrorMessage); | ||
@@ -238,3 +248,3 @@ } | ||
if (!this.remote) { | ||
if (process.env.LOGGED_IN_LOCAL === "false") { | ||
if (this.serverSide) { | ||
throw new Error(AuthService.notLoggedInErrorMessage); | ||
@@ -265,3 +275,3 @@ } | ||
if (!this.remote) { | ||
if (process.env.LOGGED_IN_LOCAL === "false") { | ||
if (this.serverSide) { | ||
throw new Error(AuthService.notLoggedInErrorMessage); | ||
@@ -298,3 +308,3 @@ } | ||
if (!this.remote) { | ||
if (process.env.LOGGED_IN_LOCAL === "false") { | ||
if (this.serverSide) { | ||
throw new Error(AuthService.notLoggedInErrorMessage); | ||
@@ -326,3 +336,3 @@ } | ||
if (!this.remote || !this.storage) { | ||
if (process.env.LOGGED_IN_LOCAL === "false") { | ||
if (this.serverSide) { | ||
throw new Error(AuthService.notLoggedInErrorMessage); | ||
@@ -355,3 +365,3 @@ } | ||
if (!this.remote || !this.storage) { | ||
if (process.env.LOGGED_IN_LOCAL === "false") { | ||
if (this.serverSide) { | ||
throw new Error(AuthService.notLoggedInErrorMessage); | ||
@@ -381,3 +391,3 @@ } | ||
if (!this.remote) { | ||
if (process.env.LOGGED_IN_LOCAL === "false") { | ||
if (this.serverSide) { | ||
throw new Error(AuthService.notLoggedInErrorMessage); | ||
@@ -397,3 +407,3 @@ } | ||
if (!this.storage) { | ||
if (process.env.LOGGED_IN_LOCAL === "false") { | ||
if (this.serverSide) { | ||
throw new Error(AuthService.notLoggedInErrorMessage); | ||
@@ -400,0 +410,0 @@ } |
{ | ||
"name": "@genezio/auth", | ||
"version": "2.0.15-dev", | ||
"version": "2.0.16-dev", | ||
"description": "SDK for accessing genezio authentication system.", | ||
@@ -5,0 +5,0 @@ "main": "./lib/index.js", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
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
50888
860
4