mirror of
https://github.com/fosrl/pangolin.git
synced 2026-02-18 10:56:38 +00:00
add my-device and force login
This commit is contained in:
@@ -5,15 +5,17 @@ import { AxiosResponse } from "axios";
|
||||
import { pullEnv } from "../pullEnv";
|
||||
|
||||
export async function verifySession({
|
||||
skipCheckVerifyEmail
|
||||
skipCheckVerifyEmail,
|
||||
forceLogin
|
||||
}: {
|
||||
skipCheckVerifyEmail?: boolean;
|
||||
forceLogin?: boolean;
|
||||
} = {}): Promise<GetUserResponse | null> {
|
||||
const env = pullEnv();
|
||||
|
||||
try {
|
||||
const res = await internal.get<AxiosResponse<GetUserResponse>>(
|
||||
"/user",
|
||||
`/user${forceLogin ? "?forceLogin=true" : ""}`,
|
||||
await authCookieHeader()
|
||||
);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user