Skip to content

Commit 1ff3d1a

Browse files
authored
refactor: Use auth mode instead of manually checking for api key in config (#494)
* Use auth mode instead of manually checking for api key in config * Update package version * Update CHANGELOG
1 parent ff600e4 commit 1ff3d1a

File tree

8 files changed

+12
-8
lines changed

8 files changed

+12
-8
lines changed

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
77

88
## [unreleased]
99

10+
## [13.1.1] - 2023-02-24
11+
12+
- Refactor dashboard recipe to use auth mode instead of manually checking for api key
13+
1014
## [13.1.0] - 2023-02-22
1115

1216
- Adds APIs and logic to the dashboard recipe to enable email password based login

lib/build/recipe/dashboard/api/signOut.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ const normalisedURLPath_1 = __importDefault(require("../../../normalisedURLPath"
5656
function signOut(_, options) {
5757
var _a;
5858
return __awaiter(this, void 0, void 0, function* () {
59-
if (options.config.apiKey) {
59+
if (options.config.authMode === "api-key") {
6060
utils_1.send200Response(options.res, { status: "OK" });
6161
} else {
6262
const sessionIdFormAuthHeader =

lib/build/version.d.ts

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

lib/build/version.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

lib/ts/recipe/dashboard/api/signOut.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ import { Querier } from "../../../querier";
1919
import NormalisedURLPath from "../../../normalisedURLPath";
2020

2121
export default async function signOut(_: APIInterface, options: APIOptions): Promise<boolean> {
22-
if (options.config.apiKey) {
22+
if (options.config.authMode === "api-key") {
2323
send200Response(options.res, { status: "OK" });
2424
} else {
2525
const sessionIdFormAuthHeader = options.req.getHeaderValue("authorization")?.split(" ")[1];

lib/ts/version.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
* License for the specific language governing permissions and limitations
1313
* under the License.
1414
*/
15-
export const version = "13.1.0";
15+
export const version = "13.1.1";
1616

1717
export const cdiSupported = ["2.8", "2.9", "2.10", "2.11", "2.12", "2.13", "2.14", "2.15", "2.16", "2.17", "2.18"];
1818

package-lock.json

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "supertokens-node",
3-
"version": "13.1.0",
3+
"version": "13.1.1",
44
"description": "NodeJS driver for SuperTokens core",
55
"main": "index.js",
66
"scripts": {

0 commit comments

Comments
 (0)