title: OAuth2 redirect URI for enterprise application
body: <p>I'm working on an enterprise application and our UI is a web application. We are looking to add OAuth2 support and I don't understand what to provide for the redirect URI field to the OAuth provider.</p>
  
  <p>For example, I have registered my app in github OAuth provider.
  Homepage URL: <a href="https://localhost:7980/index.html" rel="nofollow noreferrer">https://localhost:7980/index.html</a>
  Authorization callback URL: <a href="https://localhost:7980/oauth_callback" rel="nofollow noreferrer">https://localhost:7980/oauth_callback</a></p>
  
  <p>Now this works fine with localhost as the hostname. But, when this application gets used by the customers they can install it on any of their boxes and invoke the web app from any device connected to our server via <a href="https://[hostname]:7980/index.html" rel="nofollow noreferrer">https://[hostname]:7980/index.html</a>. In this case, if the customer wants to use OAuth2 authentication option, then I don't understand what should be the redirect URL. Obviously I cannot use localhost for redirect URL as the customer can access the web app from any machine. I wouldn't know the machine ip/hostname where the customers are going to be installing our server beforehand.</p>
  
  <p>One suggestion was to use a server from our company which would handle redirect URLs for the OAuth2 authentication. Is this a good idea? Is there a standard way for handling the use case I have narrated above in OAuth2?</p>