Open Closed

Questions on ABP Register Page/Url #7772


User avatar
0
raymondbu95 created
  • ABP Framework version: v8.0.0
  • UI Type: MVC
  • Database System: EF Core MySQL & MongoDB
  • Tiered (for MVC) or Auth Server Separated (for Angular): yes

I wonder if able to redirect to Register page from public web directly? Is there a way to generate the Register Url?


13 Answer(s)
  • User Avatar
    0
    Anjali_Musmade created
    Support Team Support Team Member

    Hello,

    Yes you can redirect to the Register page from the public web directly for that you need to create one Register button like <a href="https://localhost:44371/Account/Register">Register</a>

    In the given URL update your Authentication server port number and give it a try.

    Thanks,

  • User Avatar
    0
    raymondbu95 created

    if so, this will have the return url and client params?

  • User Avatar
    0
    Anjali_Musmade created
    Support Team Support Team Member

    Hello,

    Basically, Registration is done through the Authentication Server under the Account module https://abp.io/docs/latest/modules/account-pro#register-page. That's why when you log in through public website or Host website it will redirect to Auth server. Auth server is responsible for logging in and registering. If you want to customize the flow of registration then you need to customize at your own as per your requirements. For that you may check code of Identity Module and Account module.

    Thanks,

  • User Avatar
    0
    raymondbu95 created

    hi,

    umm actually i want redirect to authserver's register page, but also with all the return-url param like we clicked on login from public websites. i didnt want to customize the flow, just want to direct to register page when button was clicked.

  • User Avatar
    0
    raymondbu95 created

    or maybe can you show me how does the login return-url was generated? i can use that as an example

  • User Avatar
    0
    Anjali_Musmade created
    Support Team Support Team Member

    Hello,

    Please check out the previous ticket https://abp.io/support/questions/3187/redirect-to-login-page-with-returnUrl-does-not-work-after-login if it helps you

    thanks

  • User Avatar
    0
    raymondbu95 created

    Hi,

    what i meant is generate the returnurl, not hard coded in ya.

  • User Avatar
    0
    raymondbu95 created

    Nobody can answer?

  • User Avatar
    0
    liangshiwei created
    Support Team Fullstack Developer

    hi,

    You can use the current URL as the return URL.

    For example:

    var returnUrl = httpContext.Request.GetEncodedUrl()
    
  • User Avatar
    0
    raymondbu95 created

    Hi,

    Just to be clear, i want to generate return url, like this https://localhost:44322/Account/Login?ReturnUrl=%2Fconnect%2Fauthorize%3Fclient_id%3DWeb%26redirect_uri%3Dhttps%253A%252F%252Flocalhost%253A44321%252Fsignin-oidc%26response_type%3Dcode%2520id_token%26scope%3Dopenid%2520profile%2520roles%2520email%2520phone%2520AccountService%2520IdentityService%2520AdministrationService%2520SaasService%2520ProductService%26response_mode%3Dform_post%26nonce%3D638604142118781220.ZWJiNTVkNTYtOWMwOS00NTEwLTlhMGYtZTEwNTBlNjNhNWI5Yjg0NGJmMGQtNWYyZS00OTdkLTkyMjYtYmQ4YTFiOTJjNWRi%26state%3DCfDJ8BqWOdMEnGxGvE1s7ED6M6Rl_JtIkhpKcCROlH3wl7WBJgdRbOYI5cEAPaPIqSBjHr-fkCo_XUzgG50OOzcsbrcrQgb7BHjp2e04Tcc_Bivruvg5Xqg5hCYSzWJigrWOu9f1B3H6gDeDyuktA1sizFMJDgF7BUDT_ph0vau72WuaSGHk5kxaHC72fS4_1k-pQKkpTK8SHQOjjycSBWwf0O_V8DhDq1DHTOkLw2SSJLsOdsI4B1PqeG9DDgvBrFnX8bbvGeNRcOeW6KiF1eItOh9HjLw9VUgtiPoCLKpPNgC9%26x-client-SKU%3DID_NET8_0%26x-client-ver%3D7.0.3.0

    but instead login, i want it to generate for /Account/Register.

    Can point me to a direction of how to generate returnurl like this?

  • User Avatar
    0
    liangshiwei created
    Support Team Fullstack Developer

    no need to generate returnurl like that.

    you can try this https://<authserver>/account/register?returnurl=https://<publicwebsite>/account/login

  • User Avatar
    0
    raymondbu95 created

    Alright, i will give it a try.

  • User Avatar
    0
    liangshiwei created
    Support Team Fullstack Developer

    okay

Made with ❤️ on ABP v9.0.0-preview Updated on September 19, 2024, 10:13