Back

Angular hash routing destroy email verification link

  • 0
  • Web
Shoxious
21 Nov, 2023, 23:02

I am using Angular with hash routing and receive a link after registration. In this example, it is localhost: http://localhost:4200/?userId=655c3eeeb315974d5b07&secret=7084d9b9ad01b32f6c257fd8752e0966b8c4092e2edf11f278b08453f759b01dd65ffc869eb875bd2a8145b0566d43a4f1447fb8ad73fb1fdab72a5ec1e5e9fb8c46466af9aaa38855aa14011f984978dca8bd0233c47956119cfe458f5f24a208adaf2fb9f55d630cd8a2b78250a7292d99bfffa1619600a74a6d378760ba3e&expire=2023-11-28+05%3A23%3A59.250#/verify

Appwrite modifies my URL and places the parameters userId, secret, and expire between my hash. How can I solve this problem so that the parameters come after /#/verify?

TL;DR
The user is using Angular with hash routing and is receiving a URL after registration. The problem is that Appwrite modifies the URL and places the parameters between the hash. The user wants the parameters to come after /#/verify. One suggestion is to change the routing strategy to use the path strategy instead of the hash strategy. The user can refer to the Angular documentation for more information on how to do this. Another user suggests that according to the RFC for URLs, fragments should go at the end, which is why they end up after the hash. They mention avoiding the hash strategy for this reason. Lastly, another user recommends raising the issue on
Drake
21 Nov, 2023, 23:50

You might want to πŸ‘πŸΌ this issue: https://github.com/appwrite/appwrite/issues/2403

Drake
21 Nov, 2023, 23:51

This is the reason why i avoid using the hash strategy 😬

Drake
21 Nov, 2023, 23:54

The RFC for URLs say fragments go at the end: https://datatracker.ietf.org/doc/html/rfc3986#section-3 so that's why it ends up at the end

Drake
21 Nov, 2023, 23:55

any chance you can use the path strategy?

Shoxious
22 Nov, 2023, 06:29

Ok, I thought the hash strategy is important to read parameters in angular url. I am not sure if it works without 😰

Drake
22 Nov, 2023, 14:47

What do you mean?

Drake
22 Nov, 2023, 14:55
Reply

Reply to this thread by joining our Discord

Reply on Discord

Need support?

Join our Discord

Get community support by joining our Discord server.

Join Discord

Get premium support

Join Appwrite Pro and get email support from our team.

Learn more