IDP Role Mismatch When Using WebDev Page Inside Perspective iFrame

I have created a webpage using the Ignition WebDev module and embedded it in a Perspective view using an iframe. I also implemented login and logout functionality.

I have two HTML pages:

  • Dashboard
  • Checklist

The Checklist page displays plant data based on user roles defined in the Identity Provider (IDP).

Example role configuration:

  • User A → Role to access AAA plant data
  • User B → Role to access BBB plant data

These roles are configured in the IDP and mapped to users.

Application Flow:

  1. The user logs into Perspective using IDP authentication.
  2. The Dashboard page loads first.
  3. When navigating to the Checklist page and selecting a plant, a popup login page appears.

  1. In this popup, I enter User A’s credentials, while the Perspective session is already logged in as User B.

Problem:
When the WebDev page checks the user roles, it returns the roles for User A (entered in the popup login) instead of the roles for User B (the user authenticated in the Perspective session).

It appears that the browser-level authentication from the popup login is overriding or being used instead of the Perspective session's IDP authentication.

Question:
How can I ensure that the WebDev page uses the authenticated Perspective session user (User B) instead of the credentials entered in the popup login?

The issue is the use of an IFrame. IFrames are independent of, and carry no context from, the outer page. This is basic to IFrame security. (Except for keys embedded in their URL.)