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

Adapt workflows - Add id provider to auth - Add logout #70

Merged
merged 8 commits into from
Feb 2, 2024

Conversation

EricThuaud
Copy link
Contributor

No description provided.

@EricThuaud EricThuaud requested a review from Grafikart February 1, 2024 12:24
@EricThuaud EricThuaud self-assigned this Feb 1, 2024
@EricThuaud EricThuaud marked this pull request as draft February 1, 2024 13:51
Copy link
Collaborator

@Grafikart Grafikart left a comment

Choose a reason for hiding this comment

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

Quelques petites remarques

Comment on lines 20 to 21
const { logout } = useOidc({ assertUserLoggedIn: true });
return logout;
Copy link
Collaborator

Choose a reason for hiding this comment

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

Tu peux simplifier return useOidc({ assertUserLoggedIn: true }).logout

@@ -5,7 +5,7 @@ const { OidcProvider, useOidc } = await createAppOidc();

export const useHasRole = (role: string): boolean => {
const { oidcTokens } = useOidc({ assertUserLoggedIn: true });
return oidcTokens.decodedIdToken.inseegroupdefault.includes(role);
return oidcTokens.decodedIdToken.inseegroupedefaut.includes(role);
Copy link
Collaborator

Choose a reason for hiding this comment

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

Il manque pas un d et un l là ?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Non j'ai rectifié le nom aux endroits ou cela apparait dans l'appli, le token porte bien un vecteur "inseegroupedefaut" (écriture française)

@@ -25,7 +30,7 @@ export function useIsAuthenticated(): boolean {
}
login({
doesCurrentHrefRequiresAuth: false,
extraQueryParams: { kc_idp_hint: "insee-ssp" },
extraQueryParams: { kc_idp_hint: import.meta.env.VITE_IDENTITY_PROVIDER },
Copy link
Collaborator

Choose a reason for hiding this comment

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

Jme demande si c'est utile vu que tu l'a mis au niveau du createOidc (jte laisse vérifier)

Copy link

sonarqubecloud bot commented Feb 1, 2024

@EricThuaud EricThuaud requested a review from Grafikart February 1, 2024 14:21
@EricThuaud EricThuaud marked this pull request as ready for review February 1, 2024 14:39
@Grafikart Grafikart merged commit 03a4ae4 into develop Feb 2, 2024
7 of 9 checks passed
@Grafikart Grafikart deleted the adapt-workflows-add-id-provider-auth branch February 2, 2024 10:18
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