keystonejskeystonejs6

In Keystone 6, can we disable the user authentication/user login?


It looks like there was a somewhat straightforward way to disable in in Keystone 5 via - https://github.com/keystonejs/keystone-5/blob/main/docs/guides/authentication.md

But I can't seem to find any resources/direction for Keystone 6. Any guidance from the community on this?


Solution

  • I was able to get it working for my needs. In the keystone.js file, replace

    export default withAuth(
    

    with

    export default config(
    

    and disable the imports for both withAuth and sessions

    // import { withAuth, session } from './auth';
    

    also don't forget to remove session from the config export and the trailing ) at the end.