Hi,
You are going to be surprised but it’s kind of question about authentication (and I already saw FAQ). Basically everything is working fine with authentication itself (Authorization code grant flow), but don’t see what is the best approach from user interaction perspective. I mean, what is the preferred way of telling/navigating user to authentication page. What options I see now:
-
Request needed scopes upon extension activation. I have no idea how it could be done, if there is some “onInstall” hooks or special install.js scripts or manifest… I just know that it’s working this way with Voicemod Live | Voice changer extension and, as for me, it’s a very good approach to let user know from the beginning, that some access is required. Any hints how it’s implemented?
-
Add some button in the extension configuration interface and window.open(‘url’) from the script. The problem is that I cannot get the result of this operation from opened window (window.opener.postMessage is received by supervisor, I guess, but not my iframe), so the only way of displaying if everything is fine - is polling for backend (not nice), or trying to use pubsub messaging (not intended for this, for real), or installing some websocket connection with the backend (a little bit overkill for configuration page).
So… my question is - what is the preferred workflow of requesting some access for user for extension? What am I missing?
Any help would be appreciated. Thanks!