Skip to content

feat: add OAuth2 applications #11197

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 30 commits into from
Dec 21, 2023
Merged
Changes from 1 commit
Commits
Show all changes
30 commits
Select commit Hold shift + click to select a range
c7d69e2
Add database tables for OAuth2 applications
code-asher Dec 11, 2023
3c096b2
Add endpoints for managing OAuth2 applications
code-asher Dec 11, 2023
430140e
Add frontend for managing OAuth2 applications
code-asher Dec 12, 2023
35978ed
Add types to oauth2 stories
code-asher Dec 14, 2023
7e2db88
Remove redundant existence checks
code-asher Dec 14, 2023
f224ebc
Remove unnecessary function wrappers
code-asher Dec 14, 2023
c57b400
Add types to default meta storybook exports
code-asher Dec 14, 2023
d2e6d37
Mark secrets array as readonly
code-asher Dec 14, 2023
de11363
Replace isUpdating with object
code-asher Dec 14, 2023
d767d25
Remove unnecessary undefined on useState
code-asher Dec 14, 2023
9473478
Rename apps to "provider apps"
code-asher Dec 14, 2023
70ffd00
Comment about hashed and display secret
code-asher Dec 14, 2023
8035333
Rename secret ID param
code-asher Dec 14, 2023
fd13c02
Move db to sdk conversions to db2sdk.go
code-asher Dec 14, 2023
64ef328
Be more helpful with app and secret mismatches
code-asher Dec 14, 2023
7c7fd7e
Clarify new secret vs secret list
code-asher Dec 14, 2023
765ee0c
Remove invalid JSON from test entities
code-asher Dec 14, 2023
1e08e4d
Remove redundant type
code-asher Dec 14, 2023
3e69495
Refactor mutations
code-asher Dec 15, 2023
41ff886
Merge remote-tracking branch 'github/main' into asher/oauth-provider
code-asher Dec 15, 2023
6e2ec5a
Bump migration number
code-asher Dec 15, 2023
7c3b1b1
make gen
code-asher Dec 15, 2023
7e7cda5
Add dev and entitlement checks to oauth2 provider
code-asher Dec 15, 2023
1be8f15
Move badges underneath header
code-asher Dec 18, 2023
511850b
Improve client ID markup
code-asher Dec 18, 2023
e8e8a94
Show a 404 page on /deployment/oauth2-provider/
code-asher Dec 18, 2023
c2934fb
Clear full new secret if deleted
code-asher Dec 18, 2023
b9a6765
Merge remote-tracking branch 'github/main' into asher/oauth-provider
code-asher Dec 18, 2023
d8927ca
Bump migration number
code-asher Dec 18, 2023
bd8cab4
Fix undefined error in edit oauth2 stories
code-asher Dec 21, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Show a 404 page on /deployment/oauth2-provider/
One day we might have other settings on this page but for now there is
nothing to show.
  • Loading branch information
code-asher committed Dec 18, 2023
commit e8e8a94e69f67db2c6e568b5655da83ed8079289
1 change: 1 addition & 0 deletions site/src/AppRouter.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -335,6 +335,7 @@ export const AppRouter: FC = () => {
/>

<Route path="oauth2-provider">
<Route index element={<NotFoundPage />} />
<Route path="apps">
Copy link
Member

Choose a reason for hiding this comment

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

One thing I noticed during testing: I think there should be a redirect or something when the user tries to go go the deployment/oauth2-provider/ URL path

Right now, it doesn't take you to a completely empty screen, but you only see the navbar and the Deployment options

Copy link
Member Author

Choose a reason for hiding this comment

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

I am hesitant to do that because one day we might have something else on that page (like for example a toggle for whether to enable the oauth2 provider) and I would not want folks getting confused learning they can go to just /oauth2-provider to get to the apps, if that makes sense.

Copy link
Member Author

Choose a reason for hiding this comment

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

That said, seems like it should at least show a proper 404. Mine gives this error:

"user" must be an existing uuid or username.
queried user="deployment"

So I guess it is falling through to some other page.

Copy link
Member Author

Choose a reason for hiding this comment

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

Whoops I was on dev.coder.com, yeah you are right it shows a blank page with the deployment sidebar. That is pretty weird. Is there even a way for me to show a 404 here? Maybe a redirect is the only fix...

Copy link
Member Author

Choose a reason for hiding this comment

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

I added a route with NotFoundPage.

Copy link
Member Author

Choose a reason for hiding this comment

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

Ah but that is weird too because the sidebar is still there. At least the page says "not found" I guess.

<Route index element={<OAuth2AppsSettingsPage />} />
<Route path="add" element={<CreateOAuth2AppPage />} />
Expand Down