fix(OpenIDConnect): Stop storing tokens in sessionStorage. Prefix OIDC routes automatically. Add logout button (#698)
This commit is contained in:
1 parent
ac347849d0
commit
f547fdf832
21 files changed
+143
-74
No files matched your search
@@ -13,7 +13,7 @@ window.config = {
|
||||
// Authorization Server URL
|
||||
authority: 'https://accounts.google.com',
|
||||
client_id: 'YOURCLIENTID.apps.googleusercontent.com',
|
||||
redirect_uri: `${window.location}callback`, // `OHIFStandaloneViewer.js`
|
||||
redirect_uri: '/callback', // `OHIFStandaloneViewer.js`
|
||||
response_type: 'id_token token',
|
||||
scope: 'email profile openid https://www.googleapis.com/auth/cloudplatformprojects.readonly https://www.googleapis.com/auth/cloud-healthcare', // email profile openid
|
||||
// ~ OPTIONAL
|
||||
|
||||
@@ -1,25 +0,0 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<title>OpenID Connect Logout Redirect Page</title>
|
||||
</head>
|
||||
<body>
|
||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/es5-shim/4.5.7/es5-shim.min.js"></script>
|
||||
<script type="text/javascript" src='es6-shim.min.js'></script>
|
||||
<script type="text/javascript" src='oidc-client.min.js'></script>
|
||||
<script type="text/javascript" src='polyfill.min.js'></script>
|
||||
<script type="text/javascript">
|
||||
// TODO: I think this is actually not necessary anymore
|
||||
new UserManager().signoutRedirectCallback().then(function() {
|
||||
// TODO: Keycloak + Auth0 is not properly logging out both sessions?
|
||||
// This is a hacky hardcoded workaround. This could also be added as a component to the React application rather than a static page.
|
||||
var path = 'https://www.crowds-cure.org';
|
||||
var client_id = 'z5cXMPTxeFOdB3i4xRA8JyhTonQmqMKM';
|
||||
var url = 'https://auth.crowds-cure.org/v2/logout?client_id=' + client_id + '&returnTo=' + path;
|
||||
window.location.href = url;
|
||||
});
|
||||
</script>
|
||||
</body>
|
||||
|
||||
</html>
|
||||
Reference in new issue
Block a user