Fixed Wrong IP being loged
This commit is contained in:
@@ -94,7 +94,12 @@ export const Register = () => {
|
||||
return;
|
||||
}
|
||||
await sendVerificationLink(user.id);
|
||||
const ip = await fetch("https://api.ipify.org/?format=json")
|
||||
.then((res) => res.json())
|
||||
.then((data) => data.ip);
|
||||
|
||||
await logAction("REGISTER", {
|
||||
ip: ip,
|
||||
userId: user.id,
|
||||
});
|
||||
await signIn("credentials", {
|
||||
|
||||
Reference in New Issue
Block a user