lucia-auth / lucia

Authentication, simple and clean
https://lucia-auth.com
MIT License
9.46k stars 485 forks source link

[Feature Request]: DatabaseKeyAttributes #1336

Closed skyf0l closed 9 months ago

skyf0l commented 9 months ago

Description

In my case, I would add more information to the key table, such as usernames or emails, to more easily identify multiple providers. I need the same as DatabaseUserAttributes or DatabaseSessionAttributes, but for keys.

pilcrowonpaper commented 9 months ago

Usernames and emails should be stored in the user table, not keys. Keys aren't intended to store more than the connection between an auth provider and a user. I'm open to listening to your use case, but we're removing keys in v3 anyway so I likely won't implement it.

skyf0l commented 9 months ago

I'm switching my app from next-auth to lucia, and I need a table like next-auth's Account table. This seems to be implemented in lucia v3, so I'll wait.