Skip to content

fix: Add redirect for OAuth from /login #1163

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
Apr 25, 2022
Merged

fix: Add redirect for OAuth from /login #1163

merged 1 commit into from
Apr 25, 2022

Conversation

kylecarbs
Copy link
Member

This allows for a complete sign-up flow:

  1. coder login https://dev.coder.com
  2. Navigates to /cli-auth
  3. Redirects to /login?redirect=%2Fcli-auth
  4. User signs in with GitHub
  5. User is redirected back to /cli-auth

This allows for a complete sign-up flow:
1. coder login https://dev.coder.com
2. Navigates to /cli-auth
3. Redirects to /login?redirect=%2Fcli-auth
4. User signs in with GitHub
5. User is redirected back to /cli-auth
@kylecarbs kylecarbs requested a review from a team as a code owner April 25, 2022 20:41
@codecov
Copy link

codecov bot commented Apr 25, 2022

Codecov Report

Merging #1163 (bec8a8b) into main (587cbac) will increase coverage by 8.78%.
The diff coverage is 100.00%.

@@            Coverage Diff             @@
##             main    #1163      +/-   ##
==========================================
+ Coverage   57.76%   66.54%   +8.78%     
==========================================
  Files         263      263              
  Lines       16427    16428       +1     
  Branches      156      156              
==========================================
+ Hits         9489    10932    +1443     
+ Misses       5907     4376    -1531     
- Partials     1031     1120      +89     
Flag Coverage Δ
unittest-go-macos-latest 53.89% <ø> (-0.06%) ⬇️
unittest-go-postgres- 65.78% <ø> (?)
unittest-go-ubuntu-latest 56.51% <ø> (+0.12%) ⬆️
unittest-go-windows-2022 53.49% <ø> (ø)
unittest-js 67.45% <100.00%> (+0.02%) ⬆️
Impacted Files Coverage Δ
site/src/AppRouter.tsx 0.00% <ø> (ø)
site/src/pages/LoginPage/LoginPage.tsx 91.30% <ø> (ø)
site/src/components/SignInForm/SignInForm.tsx 100.00% <100.00%> (ø)
agent/agent.go 66.30% <0.00%> (-3.30%) ⬇️
peerbroker/proxy.go 58.13% <0.00%> (-0.59%) ⬇️
coderd/provisionerdaemons.go 62.79% <0.00%> (+0.50%) ⬆️
provisionerd/provisionerd.go 76.23% <0.00%> (+0.80%) ⬆️
coderd/templates.go 62.29% <0.00%> (+1.63%) ⬆️
provisioner/echo/serve.go 59.20% <0.00%> (+2.40%) ⬆️
coderd/workspaceagents.go 61.78% <0.00%> (+3.92%) ⬆️
... and 9 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 587cbac...bec8a8b. Read the comment docs.

@kylecarbs kylecarbs self-assigned this Apr 25, 2022
@kylecarbs
Copy link
Member Author

@coder/frontend if anyone else has opinions on anything here, I'm open to comments/adjustments after merge too!

@kylecarbs kylecarbs merged commit 159024a into main Apr 25, 2022
@kylecarbs kylecarbs deleted the cliredirect branch April 25, 2022 22:07
kylecarbs added a commit that referenced this pull request Jun 10, 2022
This allows for a complete sign-up flow:
1. coder login https://dev.coder.com
2. Navigates to /cli-auth
3. Redirects to /login?redirect=%2Fcli-auth
4. User signs in with GitHub
5. User is redirected back to /cli-auth
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.

2 participants