Skip to content

fix: Redirect to login when unauthenticated and requesting a workspace app #2903

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

Merged
merged 1 commit into from
Jul 11, 2022

Conversation

kylecarbs
Copy link
Member

Fixes #2884.

@kylecarbs kylecarbs requested review from Emyrk and f0ssel July 11, 2022 16:15
Copy link
Member

@Emyrk Emyrk left a comment

Choose a reason for hiding this comment

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

Kinda unfortunate to have to do this with a boolean arg.

I think the other alternative is to make a middleware that wraps the response writer and "hijacks" the write back which probably isn't great either.

I do like it's only done on the /apps 👍

@kylecarbs
Copy link
Member Author

@Emyrk I tried to do that initially but was concerned about the misdirection this could give a reader of the code.

@kylecarbs kylecarbs merged commit 2c89e07 into main Jul 11, 2022
@kylecarbs kylecarbs deleted the authredirect branch July 11, 2022 18:46
@Emyrk
Copy link
Member

Emyrk commented Jul 11, 2022

@Emyrk I tried to do that initially but was concerned about the misdirection this could give a reader of the code.

Totally agree

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.

Redirect to login when PWA/Web-App is opened and cookie is expired
2 participants