Azure / Azure/api-management-developer-portal
Custom Gadget- User session is not detected while navigating to other page from Cutom Gadget
- Dominant language
- TypeScript
- Stars
- 545
- Forks
- 360
- PR merge metrics
- No merged PRs in 30d
Description
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.

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.

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.
Contributor guide
No contributing guide indexed for this repository
Research direction
Start by reproducing the custom widget in its iframe and navigating to the Profile page with the reported window.parent.parent.location.href pattern. Compare the session and menu state before navigation, after navigation, and after refresh; done means the Profile and Sign Out items appear immediately without a refresh.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- azure, typescript
- Domain
- authentication, frontend
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100