Base solution for your next web application
Open Closed

Link in Email Activation, Forget password etc doesn't work when server is private. #12430


User avatar
0
mmukkara created

Angular/.NET 13.4.

Seems like logos and links in Email Activation, Forget password etc doesn't work when server is private as the links are concatenating with API server domain link. When API server is private and Front end server is public, Email Activation, Forget password doesn't work.

Markdown is supported
Copy & paste or drag & drop images (max 30 MB per image)

5 Answer(s)
  • User Avatar
    0
    ips-jm created

    The frontend as a whole won't function properly if the API server is only accessible within a private network.

    In such a setup, every request will fail, simply because the browser - running on a public client - cannot reach the private API server.

    This configuration only works if the frontend is also being accessed from within the same private network, allowing the client to communicate with the backend.

    Markdown is supported
    Copy & paste or drag & drop images (max 30 MB per image)
  • User Avatar
    0
    mmukkara created

    That's the basic requirement we have to protect our backend server. Its normal practice for the big corporations where security is a big concern. We achieved it by creating reverse proxy to have front end public and backend private but aspnetzero sends links in for Email Activation, Forget password, logos pointing to backend server url. This is a very wrong practice.

    Markdown is supported
    Copy & paste or drag & drop images (max 30 MB per image)
  • User Avatar
    0
    ismcagdas created
    Support Team

    Hi @mmukkara

    Is it possible for you to share your app's public URL with [email protected] ? We can investigate the problem by looking at your app.

    Markdown is supported
    Copy & paste or drag & drop images (max 30 MB per image)
  • User Avatar
    0
    mmukkara created

    unfortunately I cannot shared the public url as its protected by NDA. you can recreate the issue by sending email notification to activate the user. you can take a look at what link it is going in the email.

    Markdown is supported
    Copy & paste or drag & drop images (max 30 MB per image)
  • User Avatar
    0
    oguzhanagir created
    Support Team

    Hi @mmukkara

    In the configuration of your ASP.NET Zero project, the email confirmation and reset password processes have been redirected to the host project using the WebSiteRootAddress to send confirmation links. However, to ensure that elements like the app logo and Twitter logos in the email are displayed correctly, the configuration has been set up using the ServerRootAddress. As a suggestion, it may be configured to fetch these logos from the frontend, so only the ServerRootAddress would be needed.

    Markdown is supported
    Copy & paste or drag & drop images (max 30 MB per image)