Closed getflourish closed 6 months ago
I have a similiar problem. I want to use the Frontify Finder in an Office Addin. But Office Addins does not support window.open. I can think of two solutions:
The add-ins in the Office environment, such as Word, do not allow the use of window.open. I have included some screenshots below.
The code that throws the error:
static openPopUp(e) {
const t = window.open(
'about:blank',
e.title,
`width=${e.width},
height=${e.height},
left=${e.left},
top=${e.top},
toolbar=no, menubar=no,
location=no, status=no,
directories=no, titlebar=no`,
);
if (!t)
throw new s(
'ERR_AUTH_POPUP_BLOCKED',
'Popup is blocked. Make sure to enable popups.',
);
return t;
}
We're not planning on implementing an non-popup option. But you can work around the issue by implementing a code flow with PKCE as described here: https://github.com/aaronpk/pkce-vanilla-js.
Hey! This looks like a super convenient helper!
I know this repository is built for specific purposes where it works great just like it is. But I’m in a context (WKWebView on macOS, Sketch) where
window.open()
is not available. I know how to do the auth flow myself, but it would be fantastic to use this library instead.Is it possible to get direct access to the URL and skip the Popup flow (implement some polling myself)? So I’m mainly interested in the first part that includes the PKCE (Proof Key for Code Exchange).
Curious to hear if the library provides some intermediate access to the generated URL.
Cheers!