mirror of
https://github.com/fosrl/pangolin.git
synced 2025-08-03 09:34:48 +02:00
set resource session cookie in proxy via param
This commit is contained in:
parent
34c9093469
commit
d7c4bc43a4
12 changed files with 143 additions and 81 deletions
|
@ -27,6 +27,7 @@ export const authWithPincodeParamsSchema = z.object({
|
|||
|
||||
export type AuthWithPincodeResponse = {
|
||||
codeRequested?: boolean;
|
||||
session?: string;
|
||||
};
|
||||
|
||||
export async function authWithPincode(
|
||||
|
@ -126,18 +127,20 @@ export async function authWithPincode(
|
|||
token,
|
||||
pincodeId: definedPincode.pincodeId,
|
||||
});
|
||||
const secureCookie = resource.ssl;
|
||||
const cookie = serializeResourceSessionCookie(
|
||||
token,
|
||||
resource.fullDomain,
|
||||
secureCookie,
|
||||
);
|
||||
res.appendHeader("Set-Cookie", cookie);
|
||||
// const secureCookie = resource.ssl;
|
||||
// const cookie = serializeResourceSessionCookie(
|
||||
// token,
|
||||
// resource.fullDomain,
|
||||
// secureCookie,
|
||||
// );
|
||||
// res.appendHeader("Set-Cookie", cookie);
|
||||
|
||||
logger.debug(cookie); // remove after testing
|
||||
// logger.debug(cookie); // remove after testing
|
||||
|
||||
return response<null>(res, {
|
||||
data: null,
|
||||
return response<AuthWithPincodeResponse>(res, {
|
||||
data: {
|
||||
session: token,
|
||||
},
|
||||
success: true,
|
||||
error: false,
|
||||
message: "Authenticated with resource successfully",
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue