-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Stuck on /admin/signin #2914
Comments
This sounds like the issue with secure cookies: https://www.keystonejs.com/keystonejs/keystone/#secure Relevant writeup: https://gist.github.com/molomby/6fa22c165e0025f0f83d55195f3c6e37 |
I think you have not configured root apps: [
new GraphQLApp(),
new AdminUIApp({
adminPath: AppConfig.adminPath,
authStrategy,
isAccessAllowed: auth => (Boolean(true)),
}),
new NextApp({ dir: 'app' }),
] Try to use |
|
Yeah this sounds a lot like the secure cookie problem. It's "by design" in the sense that it's trying to be secure by default but gives no warnings and doesn't really surface whats going on. This catches a lot of devs out. It plays out like this:
Right now the simplest workaround is probably to add a new environment var to your app to specifically control the const keystone = new Keystone({
name: 'Save Walter White',
adapter: new KnexAdapter(adapterConfig),
secureCookies: process.env.INSECURE_COOKIES ? false : undefined,
}); Then, if you want to start the site in "production" mode, you can run... INSECURE_COOKIES=true yarn start Note the var is in the negative here ( IMPORTANT NOTE -- The above code works on the current const keystone = new Keystone({
name: 'Save Walter White',
adapter: new KnexAdapter(adapterConfig),
// Note slight change here:
cookie: { secure: process.env.INSECURE_COOKIES ? false : undefined },
}); As @Vultraz mentioned, a related issue rears its head in production if you have a reverse proxy. It's not difficult to fix (a few lines of config) but has be very difficult to troubleshoot for a lot of people. We're still working on smoothing off some of these sharp edges. |
I had the same problem when trying to run it behind nginx for production. And this successfully solved it for me. |
Bug report
Describe the bug
Stuck on /admin/signin
To Reproduce
This may be a non-issue, I found running
npm start
is when this is produced, but it behaves normalled with Keystone is run withnpm run dev
Expected behaviour
If the correct credentials are entered, I expect to be directed to the Admin UI dashboard.
System information
There are different responses offered by Firefox and Chrome:
Additional context
I went away for a week and hadn't updated anything.
Now I have updated from 8.0.0 to 8.1.4. Same outcome.
node v12.11.0
npm 6.11.3
The text was updated successfully, but these errors were encountered: