Azure / api-management-developer-portal

Developer portal provided by the Azure API Management service.
MIT License
488 stars 318 forks source link

Issue: Login request when opening deep link despite active session #1931

Closed ZarTrox closed 2 years ago

ZarTrox commented 2 years ago

Bug description

Deep linking to a (api operation) page in the DevPortal requires extra steps like changing & decoding the URL to this format: https://{DevPortal environment base URL}/returnUrl=/api-gallery/details{URL decoded hash key path for the specific API version}

e.g. https://devportal-sandbox.com/signin?returnUrl=/api-gallery/details%23api%3Dexample-api-v2

This works in the sense that users who receive a link like this are forwarded to the specified page after login in again, even if there is an current active DevPortal window/session. This raised some questions in our team and does not seem like intended behavior.

Reproduction steps

  1. Open the site you want to reference to in the DevPortal.
  2. Copy the URL
  3. Decode the URL.
  4. Keep DevPortal window open.
  5. Paste link in new tab

image

  1. Get forwarded to login page while active window is open

image

  1. Login.
  2. Get forwarded to the deep link specified page.

Expected behavior

After pasting and entering the decoded deep link URL the user should be immediately forwarded to the specified page without logging in again if there is an active session. This should obviously not undermine any security measure.

Is your portal managed or self-hosted?

Managed

ghost commented 2 years ago

@ZarTrox, thank you for opening this issue. We will triage it within the next few business days.

AnRei123 commented 2 years ago

I would also very much appreciate if DEVs in our teams would be able to simply copy the URL from the browser address bar without the need and efforts to decode it before providing the deep link in emails or chats to other colleagues or partners.

AnRei123 commented 2 years ago

Alternatively, it would be at least an improvement if you would offer a "Copy deep link" button on the API details page widget.

AnRei123 commented 2 years ago

And it would be perfect, if you would also provide an option to always link to the first operation of the latest version of an API .

azaslonov commented 2 years ago

Hello folks, yes, it was just a bug in portal's backend, we have just fixed it. It'll go to nearest service release.

ghost commented 2 years ago

@ZarTrox, thank you for reporting the bug.