Idira Identity Flows - Receive infinite redirect looping when attempting to access Flows
Symptom
When I am attempting to access the Flows portal, user gets stuck in an infinite redirect loop between the Flows portal and the OAuth request to Identity.
Environment
Identity Flows
Idira Identity
Idira Flows
Cause
Due to a browser limit of 4kb and the number of roles likely increased cookie size.
Resolution
To modify the token script to exclude a bunch of roles, provide the following script as a text file attached to the case for token script.
The line:
setClaimArray('user_roles', LoginUser.RoleNames);
can be replaced with the following code to filter only the required roles:
var allowedRoles = ["Flows Admin", "Flows Read", "Flows Executor", "Flows Demo", "Flows Control", "Flows Contrib"];
var allRoles = LoginUser.RoleNames;
var filteredRoles = [];
var i = 0;
while (true) {
try {
var role = String(allRoles[i]);
for (var j = 0; j < allowedRoles.length; j++) {
if (role === String(allowedRoles[j])) {
filteredRoles[filteredRoles.length] = role;
break;
}
}
i++;
} catch(e) {
break;
}
}
Additionally, the customer can comment out the following line if it is not required:
setClaimArray('Roles', LoginUser.RoleObjects);