- 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)
-
0
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,
-
0
if so, this will have the return url and client params?
-
0
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,
-
0
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.
-
0
or maybe can you show me how does the login return-url was generated? i can use that as an example
-
0
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
-
0
Hi,
what i meant is generate the returnurl, not hard coded in ya.
-
0
Nobody can answer?
-
0
hi,
You can use the current URL as the return URL.
For example:
var returnUrl = httpContext.Request.GetEncodedUrl()
-
0
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?
-
0
no need to generate returnurl like that.
you can try this
https://<authserver>/account/register?returnurl=https://<publicwebsite>/account/login
-
0
Alright, i will give it a try.
-
0
okay