-
Notifications
You must be signed in to change notification settings - Fork 1.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Remove gqlSuffix from creatAuth #4968
Conversation
This pull request is being automatically deployed with Vercel (learn more). 🔍 Inspect: https://vercel.com/keystonejs/keystone-next-docs/2kApLdbRe9mRaN1auQsvDhin1JVo |
🦋 Changeset detectedLatest commit: 612a6a4 The changes in this PR will be included in the next version bump. This PR includes changesets to release 6 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
The way withAuth work is making it complex to use multiple list to sign in with, for example User list and Admin list |
Could you expand on this? Have you tried to do this and run into problems? Were you able to get it to work at all? |
I have tried some time ago and using |
That's to be expected, and something we could probably warn about (special You can totally use If you really seriously needed auth pages in the Admin UI that lets people sign in as one list or another, that's also a thing you could implement yourself in user land leveraging the same APIs that the It also means we can offer a more opinionated behaviour (with init screens, a forgotten password flow, etc) because you can replace or extend it yourself properly now if you want a different set of behaviours, without needing to make the built-in functionality super complex or generic. All that said I'm 👍 for this @timleslie, until a more specific use case for multiple auth configs against the same list emerges, and then we can test for it properly rather than having something incomplete, but implying it's possible. |
While trying to document this option in #4963 I found it very hard to justify its existence. Arguably it can be useful if you want to call
createAuth()
twice with the samelistKey
. This use case, having two different ways to authenticate against the same list seems fairly rare (though definitely not inconceivable). It's not clear to me that all the other functionality of the package would work seamlessly in such a case. Indeed we don't currently have good visibility on using two instances ofcreateAuth
against different lists in the system. e.g. the type definitionunion AuthenticatedItem = User
probably won't work.I would prefer to remove this option for now, and loop back to it in a more comprehensive way if we decide that supporting this use case is something we explicitly want to do. If that's the case, it should be explicitly tested and documented as a use case.