1
1
mirror of https://github.com/ZeroCatDev/ClassworksKV.git synced 2025-10-23 10:53:14 +00:00

Compare commits

..

No commits in common. "main" and "v1.1.0" have entirely different histories.
main ... v1.1.0

5 changed files with 5 additions and 14 deletions

View File

@ -1,6 +1,6 @@
{
"name": "ClassworksKV",
"version": "1.1.1",
"version": "1.1.0",
"private": true,
"scripts": {
"start": "node ./bin/www",

View File

@ -1 +0,0 @@
-- This is an empty migration.

View File

@ -1,9 +0,0 @@
/*
Warnings:
- You are about to drop the column `refreshToken` on the `Account` table. All the data in the column will be lost.
*/
-- AlterTable
ALTER TABLE `Account` DROP COLUMN `refreshToken`,
MODIFY `accessToken` TEXT NULL;

View File

@ -29,7 +29,8 @@ model Account {
name String? // 用户名称
avatarUrl String? // 用户头像URL
providerData Json? // OAuth提供者返回的完整信息
accessToken String? @db.Text // 账户访问令牌
accessToken String @db.Text // 账户访问令牌
refreshToken String? @db.Text // OAuth refresh token (如果提供者支持) - 可能很长,使用 TEXT
createdAt DateTime @default(now())
updatedAt DateTime @updatedAt

View File

@ -310,7 +310,7 @@ router.get("/oauth/:provider/callback", async (req, res) => {
name: normalizedUser.name || account.name,
avatarUrl: normalizedUser.avatarUrl || account.avatarUrl,
providerData: userData,
//refreshToken: tokenData.refresh_token || account.refreshToken,
refreshToken: tokenData.refresh_token || account.refreshToken,
updatedAt: new Date(),
},
});
@ -326,7 +326,7 @@ router.get("/oauth/:provider/callback", async (req, res) => {
avatarUrl: normalizedUser.avatarUrl,
providerData: userData,
accessToken,
//refreshToken: tokenData.refresh_token,
refreshToken: tokenData.refresh_token,
},
});
}