Description
One thing I would like to do more on modules that require OAuth is to more cleanly handle the Auth Code flow by allowing users to redirect back to a modules HTTP handler, but to do this the module would need to know the origin (ie, protocol as HTTPS may or may not be enabled, domain, and port, such as http://localhost:8888/
).
This would allow for modules to set their config or help file to display the exact Redirect URI that the user would need to copy/paste into their OAuth credentials settings. An example would Google Sheets is I could have the config display ${instance.origin}/instance/${instance.label}/redirect
and it could show http://localhost:8888/instance/Sheets/redirect
and remove the need for the user to copy/paste the code
from the auth process and let it all be handled automatically.
This wont be a solution for all OAuth implementations, but for some it could make the setup less technical and smoother. Long term I'd like to see a more professional solution implemented but that's beyond the scope of this feature request.