Skip to content

Commit

Permalink
refactor: Use auth mode instead of manually checking for api key in c…
Browse files Browse the repository at this point in the history
…onfig (#494)

* Use auth mode instead of manually checking for api key in config

* Update package version

* Update CHANGELOG
  • Loading branch information
nkshah2 authored Feb 25, 2023
1 parent ff600e4 commit 1ff3d1a
Show file tree
Hide file tree
Showing 8 changed files with 12 additions and 8 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## [unreleased]

## [13.1.1] - 2023-02-24

- Refactor dashboard recipe to use auth mode instead of manually checking for api key

## [13.1.0] - 2023-02-22

- Adds APIs and logic to the dashboard recipe to enable email password based login
Expand Down
2 changes: 1 addition & 1 deletion lib/build/recipe/dashboard/api/signOut.js
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ const normalisedURLPath_1 = __importDefault(require("../../../normalisedURLPath"
function signOut(_, options) {
var _a;
return __awaiter(this, void 0, void 0, function* () {
if (options.config.apiKey) {
if (options.config.authMode === "api-key") {
utils_1.send200Response(options.res, { status: "OK" });
} else {
const sessionIdFormAuthHeader =
Expand Down
2 changes: 1 addition & 1 deletion lib/build/version.d.ts

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion lib/build/version.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion lib/ts/recipe/dashboard/api/signOut.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ import { Querier } from "../../../querier";
import NormalisedURLPath from "../../../normalisedURLPath";

export default async function signOut(_: APIInterface, options: APIOptions): Promise<boolean> {
if (options.config.apiKey) {
if (options.config.authMode === "api-key") {
send200Response(options.res, { status: "OK" });
} else {
const sessionIdFormAuthHeader = options.req.getHeaderValue("authorization")?.split(" ")[1];
Expand Down
2 changes: 1 addition & 1 deletion lib/ts/version.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
* License for the specific language governing permissions and limitations
* under the License.
*/
export const version = "13.1.0";
export const version = "13.1.1";

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"];

Expand Down
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "supertokens-node",
"version": "13.1.0",
"version": "13.1.1",
"description": "NodeJS driver for SuperTokens core",
"main": "index.js",
"scripts": {
Expand Down

0 comments on commit 1ff3d1a

Please sign in to comment.