I have a provider hosted Add-In which looks like that:
In this controller I do the usual OAuth-Permission checks and retrieve the SharePoint-Context using SPTokenhelper
When the user is not authenticated I want to redirect him to the SharePoint/Office365 - login page.
On Office365, the login-page is something like
I do not want to hardcode that login-address as this may differ if it is OnPrem instead of Office365. How can I redirect to the Loginpage?
I want to retrieve the right address programmatically and NOT use a hardcoded Url, because this should work on O365 as well as on OnPrem.