api-management-developer-portal icon indicating copy to clipboard operation
api-management-developer-portal copied to clipboard

Custom Gadget- User session is not detected while navigating to other page from Cutom Gadget

Open girish-tank-avnet opened this issue 9 months ago • 4 comments

Hello,

In the Developer Portal, I created a custom widget for product subscription. This widget allows users to subscribe to a product while collecting additional information for the subscription.

image

After making a call to the Management API to subscribe to the product, and upon a successful event ("onsuccess") from that Management API call, I navigate the user to the "Profile" page. Since the custom widget is loading in an iframe within the Developer Portal, I have to navigate to the Profile page using the following syntax:

window.parent.parent.location.href = DEVELOPER_PORTAL_URL + "/profile"

This successfully navigates the user to the Profile page; however, the current user session is not recognized by the Developer Portal. Ideally, the user should see "Profile" and "Sign Out" menu items at the top right corner, as the user is already logged in. Instead, only the "Sign In" and "Sign Up" menu items are visible.

image

If the user refreshes the page, the current user session is then detected, and the menu text correctly shows "Profile" and "Sign Out" as expected.

girish-tank-avnet avatar May 08 '24 07:05 girish-tank-avnet