microsoft / oauth2-useragent

Microsoft OAuth 2.0 User Agent library for Java. Provides classes to facilitate the implementation of "4.1. Authorization Code Grant" from RFC 6749.
Other
35 stars 22 forks source link

User Agent Provider not properly recognized #43

Open AmberSparkDev opened 6 years ago

AmberSparkDev commented 6 years ago

I haven't gone into it in a lot of detail so there isn't much I can tell, but an external executable .jar was not able to find the proper UserAgentProvider, thus resulting in the authorization window never popping up.

A quick and easy hack is to explicitly set the UserAgentProvider with

System.getProperties().setProperty("userAgentProvider", "JavaFx");

I'm merely posting the issue here with the hope of saving someone else several hours of debugging. This issue occurred in a .jar artifact, but not in the IntelliJ IDE.