Skip to content

Commit 65e935a

Browse files
committed
update: remove new endpoint
1 parent dd6dc9d commit 65e935a

File tree

2 files changed

+1
-45
lines changed

2 files changed

+1
-45
lines changed

test/auth-react-server/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -685,7 +685,7 @@ morgan.token("body", function (req, res) {
685685
});
686686

687687
morgan.token("res-body", function (req, res) {
688-
return typeof res.__custombody__ ? res.__custombody__ : JSON.stringify(res.__custombody__);
688+
return typeof res.__custombody__ === "string" ? res.__custombody__ : JSON.stringify(res.__custombody__);
689689
});
690690

691691
app.use(urlencodedParser);

test/test-server/src/session.ts

Lines changed: 0 additions & 44 deletions
Original file line numberDiff line numberDiff line change
@@ -39,50 +39,6 @@ const router = Router()
3939
next(e);
4040
}
4141
})
42-
.post("/createnewsession", async (req, res, next) => {
43-
const fdiVersion = req.headers["fdi-version"] as string;
44-
45-
try {
46-
logDebugMessage("Session.createNewSessionWithoutRequestResponse %j", req.body);
47-
let recipeUserId;
48-
if (
49-
maxVersion("1.17", fdiVersion) === "1.17" ||
50-
(maxVersion("2.0", fdiVersion) === fdiVersion && maxVersion("3.0", fdiVersion) !== fdiVersion)
51-
) {
52-
// fdiVersion <= "1.17" || (fdiVersion >= "2.0" && fdiVersion < "3.0")
53-
recipeUserId = supertokens.convertToRecipeUserId(req.body.userId);
54-
} else {
55-
recipeUserId = supertokens.convertToRecipeUserId(req.body.recipeUserId);
56-
}
57-
const response = await Session.createNewSession(
58-
req,
59-
res,
60-
req.body.tenantId || "public",
61-
recipeUserId,
62-
req.body.accessTokenPayload,
63-
req.body.sessionDataInDatabase,
64-
req.body.userContext
65-
);
66-
67-
res.json({
68-
sessionHandle: response.getHandle(),
69-
userId: response.getUserId(),
70-
tenantId: response.getTenantId(),
71-
userDataInAccessToken: response.getAccessTokenPayload(),
72-
accessToken: response.getAccessToken(),
73-
frontToken: response.getAllSessionTokensDangerously()["frontToken"],
74-
refreshToken: response.getAllSessionTokensDangerously()["refreshToken"],
75-
antiCsrfToken: response.getAllSessionTokensDangerously()["antiCsrfToken"],
76-
accessTokenUpdated: response.getAllSessionTokensDangerously()["accessAndFrontTokenUpdated"],
77-
recipeUserId: {
78-
recipeUserId: response.getRecipeUserId().getAsString(),
79-
},
80-
});
81-
} catch (e) {
82-
console.log(e);
83-
next(e);
84-
}
85-
})
8642
.post("/getsessionwithoutrequestresponse", async (req, res, next) => {
8743
try {
8844
logDebugMessage("Session.getSessionWithoutRequestResponse %j", req.body);

0 commit comments

Comments
 (0)