Skip to content

Commit

Permalink
No /init in publicPages if not using initFirstItem (#5005)
Browse files Browse the repository at this point in the history
  • Loading branch information
timleslie authored Mar 3, 2021
1 parent ceab7dc commit 9f24091
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
5 changes: 5 additions & 0 deletions .changeset/spotty-rockets-design.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@keystone-next/auth': patch
---

Updated `createAuth` to only include `/init` in `publicPages` if `initFirstItem` is being used.
5 changes: 4 additions & 1 deletion packages-next/auth/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,10 @@ export function createAuth<GeneratedListTypes extends BaseGeneratedListTypes>({
*
* Must be added to the ui.publicPages config
*/
const publicAuthPages = ['/signin', '/init'];
const publicAuthPages = ['/signin'];
if (initFirstItem) {
publicAuthPages.push('/init');
}

/**
* extendGraphqlSchema
Expand Down

1 comment on commit 9f24091

@vercel
Copy link

@vercel vercel bot commented on 9f24091 Mar 3, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.