Using Auth0 with Figma Plugin

Hi, it’s my first time using OAuth with a Figma plugin.

I’m following the SPA Quickstart guide, and I’m having trouble embedding it inside the Figma plugin. I’ve managed to redirect the plugin iframe to point to my server, which hosts the Auth0 login code, but when I run auth0Client.loginWithPopup(options) I get the following error:

Log in failed Error: Unable to open a popup for loginWithPopup - window.open returned `null`

I presume this has something to do with the popup being opened from inside the plugin. But I’m not sure what I need to do to solve it. If I click on the login button from my server not inside the plugin, it loads the Auth0 page fine.

Anyone had experience of setting up Auth0 with a Figma plugin before?

My apologies if these are not the relevant tags for this post, I’m forced to select two and I can’t create my own.

Below is a link to Figma’s documentation on integrating a service where a user needs to authenticate using a 3rd party service. If it’s helpful.