We have an issue wherein when a user is redirected to our application from an external point such as an email link and if the user is lightning enabled then the custom VF page does not display the headers and sidebar information properly. In order to resolve this, we have an option.
From the email link we redirect the user to a page which checks if the user is lightning enabled or classic, and if the user is lightning enabled, then we append the URL
to our URL and use it to redirect to the required page.
We just want to know if this is the ideal solution or there is some other option to this.