Jake Pucan
Jake Pucan

Reputation: 656

Securing Login Form using IP Address

I have a user's table and it contains the ff.

uid
username
password
ip

Here is the scene:
If UserA was successfully logged in, the IP row will insert an IP so that if someone attempt to log in or attack, it will check first if IP exist(meaning: account is in use) on row and if it does, it will reject the login request. and if UserA logged out the IP on row will become empty.

Is this good enough to secure my login and user?

Upvotes: 0

Views: 199

Answers (1)

Liam
Liam

Reputation: 2837

I would not use the IP as someone else can login from same network with same IP. Perhaps you could just hash out the time of login and save the hash in the db and in session.

Upvotes: 0

Related Questions