Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

feat: fix 404 on the first app loads when unauthenticated#10262

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
Emyrk merged 5 commits intomainfromstevenmasley/404_on_app_login
Oct 16, 2023

Conversation

Emyrk
Copy link
Member

@EmyrkEmyrk commentedOct 13, 2023
edited
Loading

Closes:#9958

What the issue was

  1. Hit app pagewithout any cookies
  2. Get redirected with a 303 to/login withredirect query param set to the app url.
  3. Hit the login page
  4. Enter credentials
  5. This code navigates you to the redirect url
  6. You hit a 404 page

The technical thing to note is that step 5 is doing a react navigation. We need to send this URL in an HTTP request to the Golang backend to generate thecoder_signed_app_token cookie. The reactNavigate does not send an HTTP request to theredirectTo url.

This is also an issue with subdomain based apps. The redirect fails.

What changes

This changes all app based redirects to a window.location.href change. This triggers a new HTTP request to the redirect url which the Golang BE can return aset-cookie for the app authentication.

@EmyrkEmyrk requested a review fromaslilacOctober 13, 2023 17:46
Emyrkand others added2 commitsOctober 13, 2023 14:09
Co-authored-by: Kayla Washburn <mckayla@hey.com>
Copy link
Collaborator

@BrunoQuaresmaBrunoQuaresma left a comment

Choose a reason for hiding this comment

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

Thanks for adding the comments! I don't like this way too much but I can see why it is needed... maybe in the future we can figure out a better solution.

Emyrk reacted with thumbs up emoji
@EmyrkEmyrk merged commit5a90228 intomainOct 16, 2023
@EmyrkEmyrk deleted the stevenmasley/404_on_app_login branchOctober 16, 2023 14:29
@github-actionsgithub-actionsbot locked and limited conversation to collaboratorsOct 16, 2023
Sign up for freeto subscribe to this conversation on GitHub. Already have an account?Sign in.
Reviewers

@aslilacaslilacaslilac left review comments

@BrunoQuaresmaBrunoQuaresmaBrunoQuaresma approved these changes

Assignees

@EmyrkEmyrk

Labels
None yet
Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

404 first time with shared path-basedcoder_app even withCODER_DANGEROUS_ALLOW_PATH_APP_SHARING set to true
3 participants
@Emyrk@aslilac@BrunoQuaresma

[8]ページ先頭

©2009-2025 Movatter.jp