mirror of
https://github.com/farcasclaudiu/openclaw.git
synced 2026-06-29 13:02:10 +03:00
chore: Run pnpm format:fix.
This commit is contained in:
@@ -98,9 +98,7 @@ async function requestOAuthCode(params: {
|
||||
);
|
||||
}
|
||||
if (payload.state !== params.state) {
|
||||
throw new Error(
|
||||
"MiniMax OAuth state mismatch: possible CSRF attack or session corruption.",
|
||||
);
|
||||
throw new Error("MiniMax OAuth state mismatch: possible CSRF attack or session corruption.");
|
||||
}
|
||||
return payload;
|
||||
}
|
||||
@@ -144,9 +142,7 @@ async function pollOAuthToken(params: {
|
||||
return {
|
||||
status: "error",
|
||||
message:
|
||||
payload?.base_resp?.status_msg ??
|
||||
text ||
|
||||
"MiniMax OAuth failed to parse response.",
|
||||
(payload?.base_resp?.status_msg ?? text) || "MiniMax OAuth failed to parse response.",
|
||||
};
|
||||
}
|
||||
|
||||
@@ -165,9 +161,9 @@ async function pollOAuthToken(params: {
|
||||
};
|
||||
|
||||
if (tokenPayload.status === "error") {
|
||||
return { status: "error", message: "An error occurred. Please try again later"};
|
||||
return { status: "error", message: "An error occurred. Please try again later" };
|
||||
}
|
||||
|
||||
|
||||
if (tokenPayload.status != "success") {
|
||||
return { status: "pending", message: "current user code is not authorized" };
|
||||
}
|
||||
@@ -215,7 +211,6 @@ export async function loginMiniMaxPortalOAuth(params: {
|
||||
let pollIntervalMs = oauth.interval ? oauth.interval : 2000;
|
||||
const expireTimeMs = oauth.expired_in;
|
||||
|
||||
|
||||
while (Date.now() < expireTimeMs) {
|
||||
params.progress.update("Waiting for MiniMax OAuth approval…");
|
||||
const result = await pollOAuthToken({
|
||||
|
||||
Reference in New Issue
Block a user