webdevcody / wdc-saas-starter-kit

https://wdcstarterkit.com/
MIT License
867 stars 221 forks source link

fix: delete user sessions after password change #14

Closed ksjitendra18 closed 1 month ago

ksjitendra18 commented 1 month ago

This PR aims to fix an issue that after password changes the session remains which could be security issue. I have modified the deleteSessionForUser and introduced an option trx parameter which defaults to database.

Also there's use case defined invalidateSessionsUseCase but it's implementation doesn't have transactions so I have directly called the function in the users.tsx