Skip to content
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

OIDC header variant link fixes for new features #103

Conversation

Charlesthebird
Copy link
Collaborator

@Charlesthebird Charlesthebird commented Sep 20, 2024

This PR adds links for the new teams + apps pages to the OIDC auth header variant, as well as some refactoring of that area.

Signed-off-by: Nicholas Bucher <behappy54321@gmail.com>
@solo-changelog-bot
Copy link

Issues linked to changelog:
https://github.com/solo-io/gloo-mesh-enterprise/issues/18658

@Charlesthebird Charlesthebird changed the title added fixes for the oidc header and some refactoring of that area. OIDC header variant link fixes for new features Sep 20, 2024
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I combined most of the logic that was spread out between the 2 header variant files into this one. It was easy to forget to maintain both variants, so this should make it easier to support both.

/**
* Since we support different authorization types, this is the way to tell if someone is logged in.
*/
export function useIsLoggedIn() {
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I ran into some issues keeping this in the context, related to the access token state and SWR. Splitting it out into a separate hook and using useIsOidcAuthLoggedIn fixed this.

@Charlesthebird Charlesthebird marked this pull request as ready for review September 20, 2024 18:08
</div>
<div className="siteNavigating">
<NavLink to={"/"} className={"navLink"} end>
Home
Copy link
Contributor

Choose a reason for hiding this comment

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

nit: we might want to consider moving all the nav links into an array or some such above with all if/else logic outside of the render, and then just have a map here (similar to what we did for sidebar in mesh repo)

@Charlesthebird Charlesthebird merged commit da84cf9 into gg-portal-1.18-features Sep 20, 2024
4 checks passed
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