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: Make width and height of dialog window configurable #146

Open jsaele opened 5 years ago

jsaele commented 5 years ago

When using office-js to create a dialog window it's possible to configure the size of the window.

Authenticator uses this under the hood, but it's not avaliable to configure for users. Seems to be hardcoded in authenticator.ts:153:

let redirectUrl = await new Dialog<string>(url, 1024, 768, useMicrosoftTeams).result;

Please correct me if I'm wrong.

I propose a change where we either add the params width and height, or an option obj, to either the Authenticator constructor or the authenticate method.

Could possibly change the constructor of Authenticator to just be an option object, but that would be a breaking change.