This is the weirdest issue I ever found on HTML and, to be honest, I don't have a clue where to start from. Any idea will be very helpful as I am stacked and I don't know what else to look for.
Description of the Application
In my company, we build a project, that consists of the application management dashboard and the customers' front end part.
When a user is registered in our application, we sent an email that comes with a button for Auto Login into his account.
In the application management then, we have per user account a button that generates the exact same link as the button, to allow the application administrators to access the user account in the front end, by copy and paste the generated link.
The problem
Either we copy and paste the auto-login URL from the administration dashboard or from the link in the body of the users' email, we could auto-login with no problems.
If we click the link in the email body, the auto-login URL doesn't work. (By doesn't work, we mean that the user is logged in, but some pages acting as the user is not logged, while some other acting as the user is logged in. At the same time, if we perform a browser refresh, the user is again normally logged in.)
At the same link, in the email body, if we perform a Right Click -> Open link in a new tab, the link it works normally. The user is getting auto-logged in and all the operations are working as they should.
Logs
Our system, for both cases (either click, right-click or copy-paste), doesn't log any errors in any logging sides (console and browser console)
What we have tried so far
We have copied the links in a plane empty index.html file, that comes only with two links like that:
Double Quoted Attributes:
<br>
<a href="https://u3067134.ct.sendgrid.net/ls/click?upn=......" target="_blank">
Link Button As It Appears In the Email Body
</a>
<a href="http://our-app.tld?Authorization=......" target="_blank">
The resolved Application URL After the SendGrid redirection
</a>
<br>
Single Quoted Attributes:
<br>
<a href='https://u3067134.ct.sendgrid.net/ls/click?upn=......' target="_blank">
Link Button As It Appears In the Email Body
</a>
<a href='https://our-app.tld?Authorization=......' target="_blank">
The resolved Application URL After the SendGrid redirection
</a>
<br>
Double Quoted Attributes with Encoded URL Parameters:
<br>
<a href="https://u3067134.ct.sendgrid.net/ls/click?upn=URL_ENCODED_PARAMETERS_HERE" target="_blank">
Link Button As It Appears In the Email Body
</a>
<a href="https://our-app.tld?Authorization=URL_ENCODED_PARAMETERS_HERE" target="_blank">
The resolved Application URL After the SendGrid redirection
</a>
<br>
Single Quoted Attributes with Encoded URL Parameters:
<br>
<a href='https://u3067134.ct.sendgrid.net/ls/click?upn=URL_ENCODED_PARAMETERS_HERE' target="_blank">
Link Button As It Appears In the Email Body
</a>
<a href='https://our-app.tld?Authorization=URL_ENCODED_PARAMETERS_HERE' target="_blank">
The resolved Application URL After the SendGrid redirection
</a>
But again, the links don't work with a click. At the same time, both other methods work with the exact same links (right-click -> open in a new tab, or copy-paste the link in a new browser tab)
Any idea of what could be wrong with this situation, please?