-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: use authorization flow and HDS login handler
KK-1097 KK-1126. NOTE: At this point, the (local) Tunnistamo response type is changed from implicit flow to the authorization code flow. - Install the latest version of the HDS-react. - Use the login provider that the HDS offers. - Get rid of the old OIDC implementation refactor: remove needless code from the auth folder refactor: remove the CRA service worker The app is no longer CRA app, but a Vite app. refactor: update react-helmet-async refactor: remove the old auth state for redux fix: route titles usage fix: logout profile state handling and use api token from hds login provider refactor: user loading in profile page refactor: deprecate profile reducer in favor of guardian provider refactor: add refetch profile fix: profile uses the useProfile at right time fix: the error with helmet while login process refactor: use a text callback handler to prevent flickering fix: login process redirect to profile page feat: unauthorized will redirect to profile if user has logged in fix: follow the hook rules with HOCs refactor: navigate to unauthorized when no permission to AppRoute fix: profileChildDetail rendering with login nextPath fix: remove react strict mode for better experience with hds login fix: login issues in child route chore: upgrade vitest refactor: configurations for both server types refactor: change all the react-router imports to react-router-dom refactor: upgrade the react-helsinki-headless-cms -plugin feat: audiences can be configured with env variables The default OIDC server should be set to Tunnistamo, while the Keycloak version of the Kukkuu UI cannot be published yet. chore: add comment about React.Strict and HANDLING_LOGIN_CALLBACK The HDS Login component is triggering HANDLING_LOGIN_CALLBACK during the login process, since it is not working well with the React.Strict mode. refactor: add oidc return type as configurable refactor: remove UI reducer and redux-oidc refactor: set code as default type since the implicit flow is not supported
- Loading branch information
1 parent
6ca1209
commit e055eac
Showing
99 changed files
with
1,947 additions
and
1,464 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
VITE_ORIGIN=http://localhost:3000 | ||
VITE_API_URI=https://kukkuu.api.test.hel.ninja/graphql | ||
VITE_OIDC_AUTHORITY=https://tunnistamo.test.kuva.hel.ninja | ||
VITE_OIDC_AUTHORITY=https://tunnistamo.test.kuva.hel.ninja/ | ||
VITE_CMS_URI=https://kukkuu.hkih.stage.geniem.io/graphql |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
VITE_ORIGIN= | ||
VITE_ORIGIN=http://localhost:3000 | ||
VITE_CMS_URI=https://kukkuu.hkih.stage.geniem.io/graphql | ||
VITE_OIDC_AUTHORITY="https://tunnistamo.test.kuva.hel.ninja" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,2 @@ | ||
src/domain/api/generatedTypes/graphql.tsx | ||
src/domain/headlessCms/graphql/__generated__.ts | ||
src/serviceWorker.ts |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,20 @@ | ||
<!doctype html> | ||
<html> | ||
<head> </head> | ||
<!DOCTYPE html> | ||
<html lang="en"> | ||
|
||
<body> | ||
<script src="https://cdnjs.cloudflare.com/ajax/libs/oidc-client/1.11.5/oidc-client.min.js"></script> | ||
<script> | ||
var mgr = new Oidc.UserManager(); | ||
mgr.signinSilentCallback().catch((error) => { | ||
console.error('silent_renew.html error', error); | ||
}); | ||
</script> | ||
</body> | ||
</html> | ||
<head> | ||
<title>Silent renewal</title> | ||
</head> | ||
|
||
<body> | ||
<script src="https://cdnjs.cloudflare.com/ajax/libs/oidc-client-ts/2.2.2/browser/oidc-client-ts.min.js" | ||
integrity="sha512-pt8b5O4w5Y9/xZpIhPN8Soo/YbC95SxHn0P/Mu39iYB2Ih/09TMS3Id5XPqve2f8DPC6voXOzgQNojCuqO6A4w==" | ||
crossorigin="anonymous" referrerpolicy="no-referrer"></script> | ||
<script> | ||
var mgr = new oidc.UserManager({}); | ||
mgr.signinSilentCallback().catch(error => { | ||
console.error('silent_renew.html error', error); | ||
}); | ||
</script> | ||
</body> | ||
|
||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.