Regarding : provide an interface to allow and admin to do an Oauth flow
- Yes, you can perform the OAuth2 on postman and hardcode the access_token, refresh_token inside your app, once, during setup/onboarding. you can definitely build a front end for this but you can set it up once for a backend token refresh.
Regarding: offer an endpoint to provide the token upon request from the desktop widget
Yes, in this example (video in the readme) - the token is provided in an endpoint
and requires some additional key/value pairs to ensure token is returned to an authorized party.
This is basically a middleware that returns a valid access Token to be used continously for Admin related operations for other applications.
Regarding: increased support burden and cost and works against the main impetus for cloud migrations.
Yes, that is true in the case of requiring middleware for this. There is no API key / one time access token as of today.
The Widget has to be hosted as a compiled bundle on a CDN, there is no way to host widgets locally on the desktop today.
The problem with Desktop.actions.getToken() as of today is that the token requested has to be requested initially upon login by the desktop application - and agents do not have the writable scope by default. Ony supervisors and admins have this scope. Hence in any case the agents using the widget will not be able to request for a writable token by default.
I have asked internally if we can add this functionality, at this point it is not being prioritized.
Thanks & Regards,