Files
better-auth/packages
57c7691a7b fix(api-key): non-expiring API keys (with expiresAt set to null) were being deleted by mistake (#3413)
* fix(api-key): API Keys with expiresAt not null 

The `deleteAllExpiredApiKeys` function in the apiKey plugin deletes API keys where `expiresAt` is `null`, despite these keys being intended as non-expiring. 

This occurs because the deleteMany query does not explicitly exclude null values in the expiresAt condition. 

This leads to unexpected key deletions, affecting keys like 
`{ "_id": "6876ba254c23e91c05c9e95b", "expiresAt": null }`.

* Update index.ts

* chore: lint

---------

Co-authored-by: ping-maxwell <maxwell.multinite@gmail.com>
2025-07-17 00:36:32 -07:00
..
2025-06-27 23:37:40 -07:00