OfficeDev / office-js-helpers

[ARCHIVED] A collection of helpers to simplify development of Office Add-ins & Microsoft Teams Tabs
MIT License
126 stars 56 forks source link

authenticator.authenticate appends extra parameter action=displayDialog in URL #83

Open erfaan opened 6 years ago

erfaan commented 6 years ago

Code:

    authenticator
    .authenticate(OfficeHelpers.DefaultEndpoints.Google)
    .then(function (token) {
        console.log(token);
    })
    .catch(function (error) {
        console.log(error);
    });

A new tab is opened in Safari with URL:

https://accounts.google.com/o/oauth2/v2/auth?response_type=token&client_id=XXXXXXXX&redirect_uri=https%3A%2F%2FXXXXXXXXX&scope=https%3A%2F%2Fwww.googleapis.com%2Fauth%2Fplus.me&resource=https%3A%2F%2Fwww.googleapis.com&state=XXXXXXXXX&action=displayDialog

And Google shows this error:

screen shot 2018-04-14 at 9 04 08 pm
WrathOfZombies commented 6 years ago

Will take a look and get back. What client are you using?

erfaan commented 6 years ago

I am using Outlook 16.11 (180311) on MacOS High Sierra (10.13.4)

CodingFanSteve commented 6 years ago

We are calling this code and seeing the same issue. Is there a fix for this bug? We are doing Outlook 16.13.1(180523) and macOS High Sierra (10.13.3).

sstepper commented 6 years ago

Same here. Unable to authenticate. But in Excel.

KrzysiekKuczma commented 6 years ago

I have exact same problem. I am developing PowerPoint Add-in.

alirezastack commented 5 years ago

I have the same problem on MAC OS X Word 16 with the same exact error.

ONataLux commented 5 years ago

Is this fixed yet ? I have the same problem but then for dropbox. React project.

johnrhunt commented 4 years ago

We've also spent ages trying to solve this problem, it's really quite silly that this happens as it can have a very bizzare and unexpected impact. For example, if your site is using code igniter then having an 'action' GET param breaks everything as it's a keyword in that framework.