I am struggling to comprehend why a link from an external source to my Angular app keeps redirecting to the default route page when accessed from a browser.
The scenario involves a user entering an email address, triggering an API that sends an email containing a link to a specific page within the application accessible externally. This page does not require authentication and should be directly accessible via the received email link for the invitation sign-up process to proceed. The URL generated includes a key that is validated upon accessing the page to ensure the user has a valid invitation.
Upon attempting to access the URL, I have observed a peculiar behavior where the first time results in redirection to the default login page. However, pressing enter again skips the reload and navigates correctly to the desired page. Subsequent attempts may trigger a reload before finally navigating correctly.
Here is a sample of the external link generated for my application and sent to new users via email:
http://degould-login.dev/#/acceptinvite?key=e1061fd2-85de-42b9-89a0-ac8667bd1b84
Below is a snippet of my routes file:
// Import statements and route configurations...
The intended component (relevant code displayed) to be called:
@Component({
// Component details...
})
// TypeScript code block handling SignupComponent logic...
However, instead of the expected component being loaded, the following component is rendered:
@Component({
// Component details...
})
// TypeScript code block managing LoginComponent functionality...
My inquiry pertains to the issue of why accessing a specific page in my application via a URL link without authentication leads to redirection to the login page after the application finishes loading. Is this behavior feasible for the setup I am working with?
Thank you