mirror of
https://github.com/ChatGPTNextWeb/ChatGPT-Next-Web.git
synced 2025-10-08 19:16:37 +08:00
23 lines
402 B
TypeScript
23 lines
402 B
TypeScript
"use client";
|
|
|
|
import { signIn, useSession } from "next-auth/react";
|
|
|
|
import { useEffect } from "react";
|
|
import { Loading } from "../components/home";
|
|
|
|
export default function Login() {
|
|
const session = useSession();
|
|
|
|
useEffect(() => {
|
|
const handleLogin = async () => {
|
|
signIn("azure-ad", {
|
|
callbackUrl: "/",
|
|
});
|
|
};
|
|
|
|
handleLogin();
|
|
}, []);
|
|
|
|
return <Loading />;
|
|
}
|