Is it possible to have a database model that associates Accounts with Sessions instead of Users? #12242
Unanswered
william-will-angi
asked this question in
Help
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
I am trying to determine whether next-auth is appropriate for our use case. It seems like it is not based on the database schema described here: https://authjs.dev/concepts/database-models.
For some context, I am using next-auth for a single provider (Keycloak) and I never plan to add any additional providers.
I got one of the database adapters "working", however with some experimenting it seems that this has a massive downside:
Is there an easy way to have the Account table associated with sessions instead of users? Looking at the adapter pattern, it doesn't seem possible without abusing the existing models. If not, I am starting to think next-auth is the wrong solution for our use case (which is fine, but I would like to verify this isn't possible before trying to roll my own auth implementation).
Beta Was this translation helpful? Give feedback.
All reactions