Coder Social home page Coder Social logo

security(web): add lastLoginAt about inbox HOT 7 CLOSED

un avatar un commented on August 23, 2024
security(web): add lastLoginAt

from inbox.

Comments (7)

babblebey avatar babblebey commented on August 23, 2024 1

Great! I'd like to take a dig at this, if you assign me 😉

Thanks 😁

from inbox.

skushagra9 avatar skushagra9 commented on August 23, 2024

Its the extension in the security page right ?

from inbox.

McPizza0 avatar McPizza0 commented on August 23, 2024

no this is more database/backend

from inbox.

skushagra9 avatar skushagra9 commented on August 23, 2024

got it thanks

from inbox.

babblebey avatar babblebey commented on August 23, 2024

Project here is some great stuff @McPizza0 😉

The changes looks like it should be made in the following files

  • apps/web-app/server/trpc/routers/authRouter/signupRouter
  • apps/web-app/server/trpc/routers/authRouter/passwordRouter
  • apps/web-app/server/trpc/routers/authRouter/passkeyRouter

Of course after modifying the database schema adding the new field lastLoginAt of datetime/timestamp type with no defaults in...

packages/database/schema.ts

This field will get an initial value at execution of the signupRouter after the lucia session can be confirmed as successfully created session.

Then the field can get updated at login, when the passwordRouter or passkeyRouter shoots after the session can be confirmed as successfully created session.

Correct me if I'm off here 🫣

the data would be used to check for active/inactive users by combining lastLoginAt with a check on active sessions

How'd you mean here though?? Is this some thoughts around the use case of this field?? Or you're looking to include this in the implementation??? 🤔

from inbox.

McPizza0 avatar McPizza0 commented on August 23, 2024

@babblebey !
yes you got the idea right
re: checking active; this would just be done manually - not a feature in app
a lightweight product analytics

from inbox.

McPizza0 avatar McPizza0 commented on August 23, 2024

Epic!

from inbox.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.