OAuth: Setup OAuth server
You should set both TElHTTPSServer.AuthWebForm and TElHTTPSServer.UseOAuth2 properties to true. The first one enables Web-form authentication, the second one enables OAuth2 support. Web-form authentication is used in a few OAuth2 scenarios.
Then you should create and populate an instance of TElHTTPOAuth2MemoryApplicationStorage and assign it to TElHTTPSServer.ApplicationInfoStorage property. The instance should contain a list of registered OAuth2 (client) applications that are allowed to work with your server.
TElHTTPSServer.OnGetUserPassword event handler should be implemented to check login credentials in runtime. The event is fired each time the client tries to authenticate using OAuth2.