Merge pull request #181 from sijinhui/add-google-auth

修复样式
This commit is contained in:
sijinhui 2024-10-03 01:49:32 +08:00 committed by GitHub
commit f2b91092b8
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
5 changed files with 40 additions and 6 deletions

View File

@ -20,7 +20,7 @@ export default function LoginByGoogle() {
console.log("[auth log]", r);
});
}}
className={`bg-transparent hover:bg-transparent`}
className={`bg-transparent hover:bg-transparent h-6`}
>
{loading ? (
<LoadingDots color="#A8A29E" />
@ -35,9 +35,10 @@ export default function LoginByGoogle() {
{/* */}
{/*</svg>*/}
<GoogleCircleFilled
className={`text-gray-500 dark:text-white cus-google-icon-color`}
style={{
fontSize: "24px",
color: "rgb(107 114 128/var(--tw-text-opacity)) !import",
// color: "rgb(107 114 128/var(--tw-text-opacity)) !important",
}}
/>
{/*<p className="text-sm font-medium text-stone-600 dark:text-stone-400">*/}

View File

@ -2,6 +2,7 @@ import LoginByGithub from "./loginByGithub";
import LoginByGoogle from "./loginByGoogle";
import UserLoginCore from "./user-login-core";
import { Suspense } from "react";
import { Space } from "antd";
export default function LoginPage() {
return (
@ -31,8 +32,10 @@ export default function LoginPage() {
{" "}
{" "}
</span>
<Space size="1">
<LoginByGithub />
<LoginByGoogle />
</Space>
<div className="w-5/12" />
</div>
</>

View File

@ -130,3 +130,15 @@ input {
#login-form .ant-input-group-addon {
background-color: white;
}
.cus-google-icon-color {
--tw-text-opacity: 1;
color: rgb(107 114 128/var(--tw-text-opacity)) !important;
}
@media (prefers-color-scheme: dark) {
.cus-google-icon-color {
--tw-text-opacity: 1;
color: rgb(255 255 255 / var(--tw-text-opacity)) !important;
}
}

View File

@ -198,7 +198,7 @@ export const authOptions: NextAuthOptions = {
},
// 重定向
async redirect({ url, baseUrl }) {
console.log('---------', url, new URL(url), baseUrl)
// console.log('---------', url, new URL(url), baseUrl)
return baseUrl;
}
},

View File

@ -50,7 +50,25 @@ server {
#PROXY-START/
location ^~ /
# 代理到海外,匹配 /api 下名称不是 基础认证 的回调
location ~ ^/api/auth/callback/(?!credentials).*$ {
proxy_pass http://127.0.0.1:23000;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
}
# 代理到海外,匹配 /api 下名称不是 基础认证 的登录
location ~ ^/api/auth/signin/(?!credentials).*$ {
proxy_pass http://127.0.0.1:23000;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
}
location ~ /
{
proxy_pass http://127.0.0.1:23000;
proxy_set_header Host $host;