When either hint or button are set to a value, a button will appear and wait for the user to click it before opening the popup.
/drivers/<driver_id>/driver.js
constHomey=require("homey");constAPI_URL="https://api.myservice.com/oauth2/authorise?response_type=code";constCALLBACK_URL="https://callback.athom.com/oauth2/callback/";constCLIENT_ID=Homey.env.CLIENT_ID;constOAUTH_URL=`${API_URL}&client_id=${CLIENT_ID}&redirect_uri=${CALLBACK_URL}`;classDriverextendsHomey.Driver {asynconPair(session) {constmyOAuth2Callback=awaitthis.homey.cloud.createOAuth2Callback(OAUTH_URL); myOAuth2Callback.on("url", (url) => {// dend the URL to the front-end to open a popupsession.emit("url", url); }).on("code", (code) => {// ... swap your code here for an access token// tell the front-end we're donesession.emit("authorized"); }); }}module.exports= Driver;