Skip to content
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

Fixes redirect to signin page in @keystone-6/auth when using basePath #8641

Merged
merged 4 commits into from
Jun 19, 2023

Conversation

borisno2
Copy link
Member

@borisno2 borisno2 commented Jun 19, 2023

This pull request adds the user provided ui.basePath to the publicPages used by @keystone-6/auth to ensure that when re-directing to /signin, the user actually lands on ${basePath}/signin.

As part of this change, we added basePath to the pageMiddleware function, to support other custom middleware in fixing their functionality too.

@changeset-bot

This comment was marked as resolved.

@borisno2 borisno2 changed the title Fixes redirect to signing page in @keystone-6/auth when using basePath Fixes redirect to signin page in @keystone-6/auth when using basePath Jun 19, 2023
@codesandbox-ci
Copy link

codesandbox-ci bot commented Jun 19, 2023

This pull request is automatically built and testable in CodeSandbox.

To see build info of the built libraries, click here or the icon next to each commit SHA.

Latest deployment of this branch, based on commit 0955ece:

Sandbox Source
@keystone-6/sandbox Configuration

@dcousens dcousens merged commit 19bb460 into main Jun 19, 2023
@dcousens dcousens deleted the fix-auth-basePath branch June 19, 2023 01:52
@pldvd
Copy link

pldvd commented Jun 19, 2023

I upgraded to "@keystone-6/core": "^5.3.0" last Friday because I wanted to use ui.basePath, I noticed that something was wrong with the redirects but couldn't investigate much to understand so I left it there. Today I had a closer look and found this MR. It fixed my app, and just in the right moment! Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Issue with wrong /signin redirection when basePath is changed to /admin
3 participants