-
-
Notifications
You must be signed in to change notification settings - Fork 2.7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'develop' into fix/deployment-guide
- Loading branch information
Showing
177 changed files
with
1,268 additions
and
800 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
import { generateResetPasswordTokenWorkflow } from "@medusajs/core-flows" | ||
import jwt from "jsonwebtoken" | ||
import { medusaIntegrationTestRunner } from "@medusajs/test-utils" | ||
import jwt from "jsonwebtoken" | ||
import { | ||
adminHeaders, | ||
createAdminUser, | ||
|
@@ -264,6 +264,28 @@ medusaIntegrationTestRunner({ | |
expect(response.response.status).toEqual(401) | ||
expect(response.response.data.message).toEqual("Invalid token") | ||
}) | ||
|
||
it("should fail if no token is passed", async () => { | ||
jest.useFakeTimers() | ||
|
||
// Register user | ||
await api.post("/auth/user/emailpass/register", { | ||
email: "[email protected]", | ||
password: "secret_password", | ||
}) | ||
|
||
// Advance time by 15 minutes | ||
jest.advanceTimersByTime(15 * 60 * 1000) | ||
|
||
const response = await api | ||
.post(`/auth/user/emailpass/update`, { | ||
email: "[email protected]", | ||
}) | ||
.catch((e) => e) | ||
|
||
expect(response.response.status).toEqual(401) | ||
expect(response.response.data.message).toEqual("Invalid token") | ||
}) | ||
}) | ||
|
||
it("should refresh the token successfully", async () => { | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
{ | ||
"name": "@medusajs/admin-bundler", | ||
"version": "2.0.1", | ||
"version": "2.0.2", | ||
"description": "Bundler for the Medusa admin dashboard.", | ||
"author": "Kasper Kristensen <[email protected]>", | ||
"scripts": { | ||
|
@@ -18,17 +18,17 @@ | |
"package.json" | ||
], | ||
"devDependencies": { | ||
"@medusajs/types": "^2.0.1", | ||
"@medusajs/types": "^2.0.2", | ||
"@types/compression": "^1.7.5", | ||
"copyfiles": "^2.4.1", | ||
"express": "^4.21.0", | ||
"tsup": "^8.0.1", | ||
"typescript": "^5.3.3" | ||
}, | ||
"dependencies": { | ||
"@medusajs/admin-shared": "2.0.1", | ||
"@medusajs/admin-vite-plugin": "2.0.1", | ||
"@medusajs/dashboard": "2.0.1", | ||
"@medusajs/admin-shared": "2.0.2", | ||
"@medusajs/admin-vite-plugin": "2.0.2", | ||
"@medusajs/dashboard": "2.0.2", | ||
"@vitejs/plugin-react": "^4.2.1", | ||
"autoprefixer": "^10.4.16", | ||
"compression": "^1.7.4", | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
{ | ||
"name": "@medusajs/admin-sdk", | ||
"description": "SDK for building extension for the Medusa admin dashboard.", | ||
"version": "2.0.1", | ||
"version": "2.0.2", | ||
"author": "Kasper Kristensen <[email protected]>", | ||
"types": "dist/index.d.ts", | ||
"main": "dist/index.js", | ||
|
@@ -25,7 +25,7 @@ | |
"zod": "^3.22" | ||
}, | ||
"dependencies": { | ||
"@medusajs/admin-shared": "^2.0.1" | ||
"@medusajs/admin-shared": "^2.0.2" | ||
}, | ||
"peerDependencies": { | ||
"zod": "^3.22" | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,7 @@ | ||
# @medusajs/admin-shared | ||
|
||
## 2.0.2 | ||
|
||
## 2.0.1 | ||
|
||
## 2.0.0 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
{ | ||
"name": "@medusajs/admin-shared", | ||
"description": "Shared code for Medusa admin packages.", | ||
"version": "2.0.1", | ||
"version": "2.0.2", | ||
"author": "Kasper Kristensen <[email protected]>", | ||
"types": "dist/index.d.ts", | ||
"main": "dist/index.js", | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.