OAuth2 Authorization Code Flow with PKCE approach in an Intellij Plugin


Is there any latest approach people do when doing an OAuth2 Authorization Code Flow with PKCE on an Intellij Plugin?

I've checked all around and this is the only article I've found to be related:

It suggests to use a local web server to redirect from browser back to the plugin, which is possible and should be technically fine, but I'm just wondering, is there any better way of handling this?