Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
Jason_ca
Contributor II
Contributor II

JWT Auth in Qlik Cloud

We are trying to get Qlik Cloud to work using JWT auth, we followed all steps in this article Create Signed Tokens for JWT Authorization | Qlik Developer Portal, and also configured the web integration for the test origin, but couldn't get it to work. We are using following test code, and always get 401 error, not sure what is wrong or missing. I wonder if anyone who did this before can shed some light, thanks.

<script type="text/javascript">
function login() {
function isLoggedIn() {
return fetch("https://**********.us.qlikcloud.com/api/v1/users/me", {
method: 'GET',
mode: 'cors',
credentials: 'include',
headers: {
'qlik-web-integration-id': '##########',
'Authorization': 'Bearer eyJhbGciOiJSUxQ7Ntgare5QTKqENgcY78dgWUYIN54QwRuspk37tVOcdR2vv3KjAZQ6###########'
},
}).then(response => {
return response.status === 200;
});
}
return isLoggedIn().then(loggedIn => {
if (!loggedIn) {
alert('You are not logged in');
}else{
alert('You are logged in');
}
});
}
login()
</script>

10 Replies
david_hg96
Partner - Contributor III
Partner - Contributor III

Hi!

What can I do if cannot see the JTW option in "Identity Provider" config? I am Tenant Admin. As this article suggest: https://qlik.dev/authenticate/jwt/create-signed-tokens-for-jwt-authorization

Regards.

DHG