OfficeDev / office-js-helpers

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

authDialog does not close #115

Closed ExciteM-Blog closed 6 years ago

ExciteM-Blog commented 6 years ago

I have setup a custom endpoint, and the authenticate method seems to be working fine (although I had to pass true for the force parameter), but once the auth process is done, and this line runs in the dialog:

var isAuthDialog = OfficeHelpers.Authenticator.isAuthDialog();

It returns false, and the dialog doesn't end up closing. I have verified my AppDomain matches the location of the dialog.

ExciteM-Blog commented 6 years ago

Nevermind, I see in the code it expects one of access_token, code, error, or state in the URL:

https://github.com/OfficeDev/office-js-helpers/blob/85c94101dcbdfa8b74524b3e66dc5884b49264fa/src/authentication/authenticator.ts#L88

So I added ?error=0.