Redirect to IDE from browser


I hope this email finds you well. I am currently working on building a plugin that requires the implementation of an OAuth flow. Specifically, I need to call a URL in the browser, which will then redirect back to the IDE.

However, I am facing a challenge in finding a way to listen for the redirect. I am required to only listen when authentication is needed, and I would like to handle this programmatically.

I have been researching and came across post "360010462559-Redirect-to-IDE-from-browser" which has given me a general idea. However, I am unsure about how to register it in the plugin and only listen when necessary.

I would greatly appreciate your guidance and expertise in this matter. Your assistance will be invaluable in helping me overcome this hurdle and successfully implement the OAuth flow in my plugin.

Thank you for your time and support.

1 comment

I found the way. First extend the class with RestService.

Then register at com.intellij.httpRequestHandler extension point.

But one question remains that how to disable when this is not required or only activate when required..


Please sign in to leave a comment.