mirror of
https://github.com/fosrl/pangolin.git
synced 2026-07-09 17:18:31 +00:00
save
This commit is contained in:
parent
bdc52dcc48
commit
0e751c6609
3 changed files with 0 additions and 19 deletions
|
|
@ -69,8 +69,6 @@ export default function LoginForm({ redirect }: LoginFormProps) {
|
|||
if (res && res.status === 200) {
|
||||
setError(null);
|
||||
|
||||
console.log(res)
|
||||
|
||||
if (res.data?.data?.emailVerificationRequired) {
|
||||
router.push("/auth/verify-email");
|
||||
return;
|
||||
|
|
|
|||
|
|
@ -1,16 +0,0 @@
|
|||
import { GetUserResponse } from "@server/routers/user";
|
||||
import { verifySession } from "./verifySession";
|
||||
|
||||
export async function isValidUser(): Promise<GetUserResponse | null> {
|
||||
const user = await verifySession();
|
||||
|
||||
if (!user) {
|
||||
return null;
|
||||
}
|
||||
|
||||
if (!user.emailVerified) {
|
||||
return null;
|
||||
}
|
||||
|
||||
return user;
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue