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

IsAddin check fails in Browser, still returns true and uses Dialog framework #133

Closed YannickRe closed 5 years ago

YannickRe commented 5 years ago

In a browser the Utilities.isAddin check return true, even when using it outside of Office. This results in the helpers trying to use the Dialog framework to open an authentication window instead of a normal browser popup.

Problematic code: https://github.com/OfficeDev/office-js-helpers/blob/a7b02821b9ffc9a5d89efaaa2d8f8de701524dc2/src/helpers/utilities.ts#L180

When used in the browser, the host property is undefined. This doesn't equal WEB and therefor it is considered being in an AddIn.

Not sure who owns this anymore, so I'm tagging all: @casieber, @Zlatkovsky, @sumurthy & @LouMM

jacob-j commented 4 years ago

We are still experiencing this issue on our application. Has the bug returned? Let me know if you want reproduction steps

EDIT: Looks like the issue is that you haven't published a new package. Isn't it time to do it soon since its been a few months? Who is the owner of this package and can publish it to npm?

We have built our own dist file from the source for now.

YannickRe commented 4 years ago

This project is dead, I guess. Nobody bothers to merge PR's or is following up on issues. Since we invested in using this library, we are building from source (and implemented some other PR's as well) and continue that way until we can strip out this dependency.

jacob-j commented 4 years ago

That is sad. Really handy functions for us. Would it be possible for your team to do a fork of this project? Maybe we can help each other out if there are issues and for feature implementation.