no jwt, using qlikcliud oauth

This commit is contained in:
Manuel Romero
2024-01-22 15:55:58 +01:00
parent 84303d0632
commit c3d23d7415
6 changed files with 50 additions and 9 deletions

View File

@@ -25,7 +25,8 @@
"assets": [
"src/favicon.svg",
"src/assets",
"src/env.js"
"src/env.js",
"src/oauth-callback.html"
],
"styles": [
"node_modules/@fortawesome/fontawesome-free/scss/fontawesome.scss",

View File

@@ -9,10 +9,17 @@
<!-- Load environment variables -->
<script src="env.js"></script>
<script crossorigin="anonymous"
type="application/javascript"
src="https://cdn.jsdelivr.net/npm/@qlik/embed-web-components"
data-host="https://qmicloud-dev.qliktech.com/qcsproxy"></script>
<script
crossorigin="anonymous"
type="application/javascript"
src="https://cdn.jsdelivr.net/npm/@qlik/embed-web-components"
data-host="https://gear-presales.eu.qlikcloud.com"
data-auth-type="Oauth2"
data-client-id="9c6d9154b5299992a4e7343b6ad51f6b"
data-redirect-uri="https://qmicloud-dev.qliktech.com/oauth-callback.html"
data-access-token-storage="session"
data-auto-redirect="true"
></script>
<link rel="stylesheet" href="styles.3b2b6672156f20378f8f.css"></head>
<body>

12
dist/qmi-cloud/oauth-callback.html vendored Normal file
View File

@@ -0,0 +1,12 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" />
<script
crossorigin="anonymous"
type="application/javascript"
data-host="https://gear-presales.eu.qlikcloud.com"
src="https://cdn.jsdelivr.net/npm/@qlik/embed-web-components@0/dist/oauth-callback.js"
></script>
</head>
</html>

View File

@@ -124,6 +124,8 @@ function _isAllowedPath(path){
app.get('/*',(req, res, next) =>{
if ( _isAllowedPath(req.originalUrl) ) {
return next();
} else if (req.originalUrl.indexOf("oauth-callback.html") !== -1) {
res.sendFile(path.join(__dirname,'/../dist/qmi-cloud/oauth-callback.html'));
} else {
res.sendFile(path.join(__dirname,'/../dist/qmi-cloud/index.html'));
}

View File

@@ -9,10 +9,17 @@
<!-- Load environment variables -->
<script src="env.js"></script>
<script crossorigin="anonymous"
type="application/javascript"
src="https://cdn.jsdelivr.net/npm/@qlik/embed-web-components"
data-host="https://qmicloud.qliktech.com/qcsproxy"></script>
<script
crossorigin="anonymous"
type="application/javascript"
src="https://cdn.jsdelivr.net/npm/@qlik/embed-web-components"
data-host="https://gear-presales.eu.qlikcloud.com"
data-auth-type="Oauth2"
data-client-id="9c6d9154b5299992a4e7343b6ad51f6b"
data-redirect-uri="https://qmicloud.qliktech.com/oauth-callback.html"
data-access-token-storage="session"
data-auto-redirect="true"
></script>
</head>
<body>

12
src/oauth-callback.html Normal file
View File

@@ -0,0 +1,12 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" />
<script
crossorigin="anonymous"
type="application/javascript"
data-host="https://gear-presales.eu.qlikcloud.com"
src="https://cdn.jsdelivr.net/npm/@qlik/embed-web-components@0/dist/oauth-callback.js"
></script>
</head>
</html>