Project

General

Profile

About a making clean URLs impossible

Added by Paweł Grodowski about 4 years ago

In the post:

https://redmine.webtoolkit.eu/boards/2/topics/16870

I wrote about the problem of not being able to send a token with user authentication from the example: Auth2. I succeeded by using URI in the form of:

https://wt-cgi.onion.lan/helptext/?_=auth/mail/7RuhNlYweOolfziPIOdQGmZ4mITgptir

not:

https://wt-cgi.onion.lan/helptext/auth/mail/7RuhNlYweOolfziPIOdQGmZ4mITgptir

It's about using:

?_= auth/mail/7RuhNlYweOolfziPIOdQGmZ4mITgptir

This means that _ (underscore) is set with the value:

auth/mail/7RuhNlYweOolfziPIOdQGmZ4mITgptir

What later returns the function:

std::string& Wt::WEnvironment::internalPath()

This returned string value can be the startup internal path of the application, then the token is prepared correctly and the user can be authorized in his email can be used correctly during registration.

The example:

Hello P433318,

Thank you for joining!

To complete your registration, please finally confirm your account by clicking on the following link or copying the URL into your browser.

Please click here to confirm your registration or copy and paste the following URL into your browser: (Note: be sure to copy the entire URL, including any part of it which goes onto a second line.)
http://wt-cgi.onion.lan/helptext/auth/mail/7RuhNlYweOolfziPIOdQGmZ4mITgptir

Note to developer:

This text is resolved from the "Wt.Auth.confirmmail.subject", "Wt.Auth.confirmmail.body", and "Wt.Auth.confirmmail.htmlbody" resource keys.

Good luck with your Wt application,

The Wt team.

I would like to ask in the example above whether the link is better to set (already in the email to the user, is it possible?) by changing the static sources (keys):

"This text is resolved from the "Wt.Auth.confirmmail.subject", "Wt.Auth.confirmmail.body", and "Wt.Auth.confirmmail.htmlbody\" resource keys.\"

or is it better to redirect it from:

http://wt-cgi.onion.lan/helptext/auth/mail/7RuhNlYweOolfziPIOdQGmZ4mITgptir

?

to (for example):

(for FCgi spawned Wt App)

https://wt-cgi.onion.lan/helptext/?_=*auth/mail/7RuhNlYweOolfziPIOdQGmZ4mITgptir

?

Thank You in advance for Your answer