script-lab icon indicating copy to clipboard operation
script-lab copied to clipboard

[Excel] Redirect for OAuth2 code flow authentication opens in browser or shows a white page

Open basgroot opened this issue 5 years ago • 0 comments

Bug Report

  • Host: EXCEL
  • OS: Win10
  • Browser: Firefox
  • Environment: prod

Expected behavior:

After clicking on the link https://developer.saxobank.com/sim/login/?requestId=ODllN2UzZGFiYTUwNDNlNGIzODRjMGYwMWNkNDAxNmM3OTcwOQ%3d%3d&mode=oauth the login page is visible within the Excel run pane.

Actual behavior:

In Excel, the page becomes blank, but the expected page is not shown. When changing the target of the link the link opens in the default browser instead of Excel. Then navigating back to the embedded page https://script-lab-runner.azureedge.net/?backButton=true in Excel run pane becomes impossible.

Steps to Reproduce:

  1. Create an HTML page with a link to https://developer.saxobank.com/sim/login/?requestId=ODllN2UzZGFiYTUwNDNlNGIzODRjMGYwMWNkNDAxNmM3OTcwOQ%3d%3d&mode=oauth. After a successful authentication, a redirect back to https://script-lab-runner.azureedge.net/?backButton=true (embedded within Excel) is processed.
<a href="https://developer.saxobank.com/sim/login/?requestId=ODllN2UzZGFiYTUwNDNlNGIzODRjMGYwMWNkNDAxNmM3OTcwOQ%3d%3d&mode=oauth" target="_parent">Click here to authenticate</a>

I've tried JavaScript as well:

document.location.href = "https://developer.saxobank.com/sim/login/?requestId=ODllN2UzZGFiYTUwNDNlNGIzODRjMGYwMWNkNDAxNmM3OTcwOQ%3d%3d&mode=oauth";
  1. In Excel, choose "Run in this pane".

  2. Click on the link.

basgroot avatar Feb 16 '20 19:02 basgroot