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

fix dialog not returning an error when the user cancel or did not grant pe #67

Closed m1chaeldg closed 6 years ago

m1chaeldg commented 6 years ago

This will fix the dialog not returning an error when the user cancel or did not grant a permission to user the dialog api.

authenticator .authenticate('name of endpoint', true /* force re-authentication */) .then(function(token) { /* tokenis newly obtained. */ }) .catch(e=>{ /* This will work when user cancel the permission */ });