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

fix: Redirect to '?redirect' query parameter after successful login#307

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
bryphe-coder merged 3 commits intomainfrombryphe/fix/304/login-redirect
Feb 17, 2022

Conversation

bryphe-coder
Copy link
Contributor

Fixes#304
Unblocks#298

After logging in, the login flow should redirect to a whatever path is specified by the?redirect query parameter. This is important for cases like#298 - where we need to set?redirect=%2Fcli_auth, but also really any case where the user is linked and might have to go back to the login screen.

The fix is simple - just check if theredirect query parameter is set, and if it is, use that as the path to redirect to on success. Also adds a test case - we had one checking that we redirect to the default (root/) url, but not one of the?redirect param

@codecov
Copy link

codecovbot commentedFeb 16, 2022
edited
Loading

Codecov Report

Merging#307 (99054f9) intomain (4954a6b) willincrease coverage by0.07%.
The diff coverage is88.88%.

Impacted file tree graph

@@            Coverage Diff             @@##             main     #307      +/-   ##==========================================+ Coverage   67.95%   68.02%   +0.07%==========================================  Files         135      135                Lines        7149     7156       +7       Branches       73       74       +1     ==========================================+ Hits         4858     4868      +10+ Misses       1804     1800       -4- Partials      487      488       +1
FlagCoverage Δ
unittest-go-macos-latest66.36% <ø> (+0.21%)⬆️
unittest-go-ubuntu-latest67.59% <ø> (+0.32%)⬆️
unittest-go-windows-latest65.98% <ø> (-0.06%)⬇️
unittest-js64.81% <88.88%> (+0.19%)⬆️
Impacted FilesCoverage Δ
site/components/SignIn/SignInForm.tsx96.87% <88.88%> (-3.13%)⬇️
provisioner/echo/serve.go47.36% <0.00%> (-3.16%)⬇️
peer/conn.go79.48% <0.00%> (-1.29%)⬇️
coderd/provisionerdaemons.go57.84% <0.00%> (ø)
peer/channel.go87.19% <0.00%> (+2.43%)⬆️
peerbroker/dial.go85.71% <0.00%> (+9.52%)⬆️

Continue to review full report at Codecov.

Legend -Click here to learn more
Δ = absolute <relative> (impact),ø = not affected,? = missing data
Powered byCodecov. Last update4954a6b...99054f9. Read thecomment docs.

@bryphe-coderbryphe-coder merged commitc2ad91b intomainFeb 17, 2022
@bryphe-coderbryphe-coder deleted the bryphe/fix/304/login-redirect branchFebruary 17, 2022 16:35
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment

Reviewers

@kylecarbskylecarbskylecarbs approved these changes

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Login ignores ?redirect parameter

2 participants

@bryphe-coder@kylecarbs

[8]ページ先頭

©2009-2025 Movatter.jp