However, working on making dm.zope.saml2 Plone 5.2 compatible, I hit a bug in Plone where this mechanism was deactivated based on how the url looks like: in short, if the came_from url contained a substring remembering login, then came_from was ignored. I do not know when this bug has been introduced and when is was fixed. Maybe, what you see is related to this bug.
clicking the link goes the correct page if you are already logged in, if not logged in, goes to the log in page and after login goes the site main page.
please let me know If any of this changes your comments.
The came_from logic is implemented in Products.CMFPlone.browser.login.login.LoginForm.get_came_from. If necessary, debug this method to find out why it fails for your case. Your url does not contain a substring ressembling something related to "login". Thus, you do not set the error, I have seen.
You (or your programmer) look at the generated email and check whether the url there is correct. If so, the content rule is not to blame.
In principle, the "came_from" logic in independent from the way, the url was constructed.: You visit an url which requires authentication; you get redirected to the login form, the original url is remembered in came_from; after a successful login, a redirect to came_from brings you to the original url. Note, that this only works for GET requests (came_from cannot hold the content of a request body). In addition, the "came_from" logic is disabled for some urls (which look like urls involved with the login functionality itself). I have indicated in a previous reply where to look for details.
I am using 5.2 and this works like a champ in: Chrome, Edge, IE.
the only exception is FF. when i click on the link, FF opens and goes to the url and requires login (all makes sense). however, after i enter my login creds and press login, the browser spins for a few seconds as if trying to login, but nothing happens.
In FF settings, I allowed popups for this site (something I didn't have to do for the other browsers) and still nothing.
Any ideas why FF is acting differently?