dlebedef
348
10
Tips

Notify on new connection from new device

Posted 8 months ago by dlebedef

So here is what I would like to do:

  • when a user logs in sent him a notification if "device/browser" is new

Here is an idea on how to achieve that:

  • Use a "cookie" (some hash value) associated with a "user_sessions" table in the database where I store "browser", "platform" and "device". If they match no need to notify the user otherwise I store the new entry in the database and notify the user.

Is this a valid solution? Is there a better way of achieving this?

Please sign in or create an account to participate in this conversation.