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

supertokens-website

Package Overview
Dependencies
Maintainers
1
Versions
129
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

supertokens-website - npm Package Compare versions

Comparing version 9.0.4 to 10.0.0

5

CHANGELOG.md

@@ -7,2 +7,7 @@ # Changelog

## [10.0.0] - 2021-10-21
### Breaking changes
- Renames `getJWTPayloadSecurely` to `getAccessTokenPayloadSecurely`
## [9.0.4] - 2021-10-13

@@ -9,0 +14,0 @@

34

lib/build/axios.js

@@ -19,2 +19,9 @@ "use strict";

function(thisArg, _arguments, P, generator) {
function adopt(value) {
return value instanceof P
? value
: new P(function(resolve) {
resolve(value);
});
}
return new (P || (P = Promise))(function(resolve, reject) {

@@ -36,7 +43,3 @@ function fulfilled(value) {

function step(result) {
result.done
? resolve(result.value)
: new P(function(resolve) {
resolve(result.value);
}).then(fulfilled, rejected);
result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected);
}

@@ -146,3 +149,2 @@ step((generator = generator.apply(thisArg, _arguments || [])).next());

};
var _this = this;
Object.defineProperty(exports, "__esModule", { value: true });

@@ -211,3 +213,3 @@ var axiosError_1 = require("./axiosError");

if (antiCsrfToken !== undefined) {
configWithAntiCsrf = __assign({}, configWithAntiCsrf, {
configWithAntiCsrf = __assign(__assign({}, configWithAntiCsrf), {
headers:

@@ -218,3 +220,3 @@ configWithAntiCsrf === undefined

}
: __assign({}, configWithAntiCsrf.headers, { "anti-csrf": antiCsrfToken })
: __assign(__assign({}, configWithAntiCsrf.headers), { "anti-csrf": antiCsrfToken })
});

@@ -225,6 +227,6 @@ }

if (fetch_1.default.config.autoAddCredentials && configWithAntiCsrf.withCredentials === undefined) {
configWithAntiCsrf = __assign({}, configWithAntiCsrf, { withCredentials: true });
configWithAntiCsrf = __assign(__assign({}, configWithAntiCsrf), { withCredentials: true });
}
// adding rid for anti-csrf protection: Anti-csrf via custom header
configWithAntiCsrf = __assign({}, configWithAntiCsrf, {
configWithAntiCsrf = __assign(__assign({}, configWithAntiCsrf), {
headers:

@@ -398,3 +400,3 @@ configWithAntiCsrf === undefined

}
return __awaiter(_this, void 0, void 0, function() {
return __awaiter(void 0, void 0, void 0, function() {
var doNotDoInterception,

@@ -473,3 +475,3 @@ returnObj,

if (antiCsrfToken !== undefined) {
configWithAntiCsrf = __assign({}, configWithAntiCsrf, {
configWithAntiCsrf = __assign(__assign({}, configWithAntiCsrf), {
headers:

@@ -480,3 +482,5 @@ configWithAntiCsrf === undefined

}
: __assign({}, configWithAntiCsrf.headers, { "anti-csrf": antiCsrfToken })
: __assign(__assign({}, configWithAntiCsrf.headers), {
"anti-csrf": antiCsrfToken
})
});

@@ -490,6 +494,6 @@ }

) {
configWithAntiCsrf = __assign({}, configWithAntiCsrf, { withCredentials: true });
configWithAntiCsrf = __assign(__assign({}, configWithAntiCsrf), { withCredentials: true });
}
// adding rid for anti-csrf protection: Anti-csrf via custom header
configWithAntiCsrf = __assign({}, configWithAntiCsrf, {
configWithAntiCsrf = __assign(__assign({}, configWithAntiCsrf), {
headers:

@@ -496,0 +500,0 @@ configWithAntiCsrf === undefined

@@ -5,2 +5,9 @@ "use strict";

function(thisArg, _arguments, P, generator) {
function adopt(value) {
return value instanceof P
? value
: new P(function(resolve) {
resolve(value);
});
}
return new (P || (P = Promise))(function(resolve, reject) {

@@ -22,7 +29,3 @@ function fulfilled(value) {

function step(result) {
result.done
? resolve(result.value)
: new P(function(resolve) {
resolve(result.value);
}).then(fulfilled, rejected);
result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected);
}

@@ -29,0 +32,0 @@ step((generator = generator.apply(thisArg, _arguments || [])).next());

@@ -19,2 +19,9 @@ "use strict";

function(thisArg, _arguments, P, generator) {
function adopt(value) {
return value instanceof P
? value
: new P(function(resolve) {
resolve(value);
});
}
return new (P || (P = Promise))(function(resolve, reject) {

@@ -36,7 +43,3 @@ function fulfilled(value) {

function step(result) {
result.done
? resolve(result.value)
: new P(function(resolve) {
resolve(result.value);
}).then(fulfilled, rejected);
result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected);
}

@@ -146,3 +149,2 @@ step((generator = generator.apply(thisArg, _arguments || [])).next());

};
var _this = this;
Object.defineProperty(exports, "__esModule", { value: true });

@@ -354,3 +356,3 @@ /* Copyright (c) 2020, VRAI Labs and/or its affiliates. All rights reserved.

AuthHttpRequest.doRequest = function(httpCall, config, url) {
return __awaiter(_this, void 0, void 0, function() {
return __awaiter(void 0, void 0, void 0, function() {
var doNotDoInterception,

@@ -426,3 +428,3 @@ returnObj,

if (antiCsrfToken !== undefined) {
configWithAntiCsrf = __assign({}, configWithAntiCsrf, {
configWithAntiCsrf = __assign(__assign({}, configWithAntiCsrf), {
headers:

@@ -433,3 +435,5 @@ configWithAntiCsrf === undefined

}
: __assign({}, configWithAntiCsrf.headers, { "anti-csrf": antiCsrfToken })
: __assign(__assign({}, configWithAntiCsrf.headers), {
"anti-csrf": antiCsrfToken
})
});

@@ -445,7 +449,9 @@ }

} else if (configWithAntiCsrf.credentials === undefined) {
configWithAntiCsrf = __assign({}, configWithAntiCsrf, { credentials: "include" });
configWithAntiCsrf = __assign(__assign({}, configWithAntiCsrf), {
credentials: "include"
});
}
}
// adding rid for anti-csrf protection: Anti-csrf via custom header
configWithAntiCsrf = __assign({}, configWithAntiCsrf, {
configWithAntiCsrf = __assign(__assign({}, configWithAntiCsrf), {
headers:

@@ -524,3 +530,3 @@ configWithAntiCsrf === undefined

AuthHttpRequest.attemptRefreshingSession = function() {
return __awaiter(_this, void 0, void 0, function() {
return __awaiter(void 0, void 0, void 0, function() {
var preRequestIdToken, refresh;

@@ -609,7 +615,7 @@ return __generator(this, function(_a) {

if (antiCsrfToken_1 !== undefined) {
headers = __assign({}, headers, { "anti-csrf": antiCsrfToken_1 });
headers = __assign(__assign({}, headers), { "anti-csrf": antiCsrfToken_1 });
}
_a.label = 6;
case 6:
headers = __assign({ rid: AuthHttpRequest.rid }, headers, {
headers = __assign(__assign({ rid: AuthHttpRequest.rid }, headers), {
"fdi-version": version_1.supported_fdi.join(",")

@@ -841,3 +847,3 @@ });

// then for example, if we check a session exists, and this says yes,
// then if we getJWTPayload, that will attempt a session refresh which will fail.
// then if we getAccessTokenPayload, that will attempt a session refresh which will fail.
// Another reason to respect this is that if we don't, then signOut will

@@ -844,0 +850,0 @@ // call the API which will return 200 (no 401 cause the API thinks no session exists),

@@ -6,3 +6,3 @@ import { InputType, RecipeInterface } from "./types";

static getUserId(): Promise<string>;
static getJWTPayloadSecurely(): Promise<any>;
static getAccessTokenPayloadSecurely(): Promise<any>;
static attemptRefreshingSession: () => Promise<boolean>;

@@ -15,3 +15,3 @@ static doesSessionExist: () => Promise<boolean>;

export declare let getUserId: typeof AuthHttpRequest.getUserId;
export declare let getJWTPayloadSecurely: typeof AuthHttpRequest.getJWTPayloadSecurely;
export declare let getAccessTokenPayloadSecurely: typeof AuthHttpRequest.getAccessTokenPayloadSecurely;
export declare let attemptRefreshingSession: () => Promise<boolean>;

@@ -18,0 +18,0 @@ export declare let doesSessionExist: () => Promise<boolean>;

@@ -19,2 +19,9 @@ "use strict";

function(thisArg, _arguments, P, generator) {
function adopt(value) {
return value instanceof P
? value
: new P(function(resolve) {
resolve(value);
});
}
return new (P || (P = Promise))(function(resolve, reject) {

@@ -36,7 +43,3 @@ function fulfilled(value) {

function step(result) {
result.done
? resolve(result.value)
: new P(function(resolve) {
resolve(result.value);
}).then(fulfilled, rejected);
result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected);
}

@@ -146,3 +149,2 @@ step((generator = generator.apply(thisArg, _arguments || [])).next());

};
var _this = this;
Object.defineProperty(exports, "__esModule", { value: true });

@@ -162,6 +164,6 @@ var fetch_1 = require("./fetch");

};
AuthHttpRequest.getJWTPayloadSecurely = function() {
AuthHttpRequest.getAccessTokenPayloadSecurely = function() {
return __awaiter(this, void 0, void 0, function() {
return __generator(this, function(_a) {
return [2 /*return*/, fetch_1.default.recipeImpl.getJWTPayloadSecurely(fetch_1.default.config)];
return [2 /*return*/, fetch_1.default.recipeImpl.getAccessTokenPayloadSecurely(fetch_1.default.config)];
});

@@ -172,3 +174,3 @@ });

AuthHttpRequest.attemptRefreshingSession = function() {
return __awaiter(_this, void 0, void 0, function() {
return __awaiter(void 0, void 0, void 0, function() {
return __generator(this, function(_a) {

@@ -202,3 +204,3 @@ return [2 /*return*/, fetch_1.default.attemptRefreshingSession()];

exports.getUserId = AuthHttpRequest.getUserId;
exports.getJWTPayloadSecurely = AuthHttpRequest.getJWTPayloadSecurely;
exports.getAccessTokenPayloadSecurely = AuthHttpRequest.getAccessTokenPayloadSecurely;
exports.attemptRefreshingSession = AuthHttpRequest.attemptRefreshingSession;

@@ -205,0 +207,0 @@ exports.doesSessionExist = AuthHttpRequest.doesSessionExist;

@@ -19,2 +19,9 @@ "use strict";

function(thisArg, _arguments, P, generator) {
function adopt(value) {
return value instanceof P
? value
: new P(function(resolve) {
resolve(value);
});
}
return new (P || (P = Promise))(function(resolve, reject) {

@@ -36,7 +43,3 @@ function fulfilled(value) {

function step(result) {
result.done
? resolve(result.value)
: new P(function(resolve) {
resolve(result.value);
}).then(fulfilled, rejected);
result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected);
}

@@ -43,0 +46,0 @@ step((generator = generator.apply(thisArg, _arguments || [])).next());

@@ -6,5 +6,5 @@ import { RecipeInterface, NormalisedInputType } from "./types";

getUserId: (_: NormalisedInputType) => Promise<string>;
getJWTPayloadSecurely: (config: NormalisedInputType) => Promise<any>;
getAccessTokenPayloadSecurely: (config: NormalisedInputType) => Promise<any>;
doesSessionExist: (_: NormalisedInputType) => Promise<boolean>;
signOut: (config: NormalisedInputType) => Promise<void>;
}

@@ -19,2 +19,9 @@ "use strict";

function(thisArg, _arguments, P, generator) {
function adopt(value) {
return value instanceof P
? value
: new P(function(resolve) {
resolve(value);
});
}
return new (P || (P = Promise))(function(resolve, reject) {

@@ -36,7 +43,3 @@ function fulfilled(value) {

function step(result) {
result.done
? resolve(result.value)
: new P(function(resolve) {
resolve(result.value);
}).then(fulfilled, rejected);
result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected);
}

@@ -215,3 +218,3 @@ step((generator = generator.apply(thisArg, _arguments || [])).next());

};
this.getJWTPayloadSecurely = function(config) {
this.getAccessTokenPayloadSecurely = function(config) {
return __awaiter(_this, void 0, void 0, function() {

@@ -233,3 +236,3 @@ var tokenInfo, retry;

if (!retry) return [3 /*break*/, 4];
return [4 /*yield*/, this.getJWTPayloadSecurely(config)];
return [4 /*yield*/, this.getAccessTokenPayloadSecurely(config)];
case 3:

@@ -236,0 +239,0 @@ return [2 /*return*/, _a.sent()];

@@ -61,5 +61,5 @@ export declare type Event = {

getUserId: (config: NormalisedInputType) => Promise<string>;
getJWTPayloadSecurely: (config: NormalisedInputType) => Promise<any>;
getAccessTokenPayloadSecurely: (config: NormalisedInputType) => Promise<any>;
doesSessionExist: (config: NormalisedInputType) => Promise<boolean>;
signOut: (config: NormalisedInputType) => Promise<void>;
}

@@ -33,2 +33,9 @@ "use strict";

function(thisArg, _arguments, P, generator) {
function adopt(value) {
return value instanceof P
? value
: new P(function(resolve) {
resolve(value);
});
}
return new (P || (P = Promise))(function(resolve, reject) {

@@ -50,7 +57,3 @@ function fulfilled(value) {

function step(result) {
result.done
? resolve(result.value)
: new P(function(resolve) {
resolve(result.value);
}).then(fulfilled, rejected);
result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected);
}

@@ -57,0 +60,0 @@ step((generator = generator.apply(thisArg, _arguments || [])).next());

@@ -1,2 +0,2 @@

export declare const package_version = "9.0.4";
export declare const package_version = "10.0.0";
export declare const supported_fdi: string[];

@@ -17,3 +17,3 @@ "use strict";

*/
exports.package_version = "9.0.4";
exports.package_version = "10.0.0";
exports.supported_fdi = ["1.8", "1.9"];
{
"name": "supertokens-website",
"version": "9.0.4",
"version": "10.0.0",
"description": "frontend sdk for website to be used for auth solution.",

@@ -20,6 +20,7 @@ "main": "index.js",

"puppeteer": "5.2.1",
"typescript": "3.5.2",
"typescript": "3.8.3",
"webpack": "4.35.0",
"webpack-cli": "3.3.5",
"webpack-dev-server": "3.7.2"
"webpack-dev-server": "3.7.2",
"typedoc": "^0.22.5"
},

@@ -34,3 +35,4 @@ "scripts": {

"set-up-hooks": "cp hooks/pre-commit.sh .git/hooks/pre-commit && chmod +x .git/hooks/pre-commit",
"pack": "./node_modules/.bin/webpack -p"
"pack": "./node_modules/.bin/webpack -p",
"build-docs": "rm -rf ./docs && npx typedoc --out ./docs --tsconfig ./lib/tsconfig.json ./lib/ts/index.ts"
},

@@ -61,2 +63,2 @@ "repository": {

"homepage": "https://github.com/supertokens/supertokens-website#readme"
}
}
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