I want to create an OAuth registration/login process for my non-web application written in golang. For that, when my application is opened, I open the browser with an OAuth URL and after the successful authenitcation, the redirect_uri is set to my own url scheme myapp://
to reopen my application and pass the authentication token to it.
I managed to let my golang application register it's url scheme itself with Handling url schemes with golang?
and wenn I type in my scheme like myapp://
the browser prompts me as expected if I want to open my application.
But when I click "yes open it" it just opens a cmd
very shortly (or nothing when I compile it with go build -ldflags -Hwindowsgui
) and nothing else happens and I also don't get any logfiles written by my application, so I am pretty sure that nothing is executed.
If I change the executeable path in the registry of the scheme to open something like C:\Windows\System32\notepad.exe
it opens the Windows editor as expected.
I also tried to put my application in a Windows-folder but still nothing is executed.
I can't find any ressource on the internet regarding this problem.
Do I need to do something security wise so my application is executed, because it seems that Windows blocks the execution of my application?
One guess would be that my freshly compiled golang executable is not digital signed and therefor not executed because of security risks? Or is there something else I'm missing? Or is there another way to create url schemes for applications in local development?
Thanks for any help!