03-16-2022, 08:42 AM
Hi,
Since I migrated to IW15, something I was doing previously does not work anymore. In the WebApp main form (which is a login page), I was reading parameters from the URL in order to bypass the login view if the correct "auth_token" is provided trough the URL parameters. This detection was done directly in the login form constructor :
This code does not work anymore in IW15.
I tried using a timer and executing this code inside it, and it works. I suppose it is because the timer code is executed after the form is rendered and not in the form constructor. But is it the best way to handle a such redirection, or is there another recommended method ?
Best regards,
Adrien
Since I migrated to IW15, something I was doing previously does not work anymore. In the WebApp main form (which is a login page), I was reading parameters from the URL in order to bypass the login view if the correct "auth_token" is provided trough the URL parameters. This detection was done directly in the login form constructor :
Code:
constructor TLoginView.Create(AOwner: TComponent);
var
...
begin
if WebApplication.RunParams.Values['username'] <> '' then
begin
txtUserName.Text := WebApplication.RunParams.Values['username'];
LUserCredentials := True;
end;
if WebApplication.RunParams.Values['auth_token'] <> '' then
begin
txtPassword.Text := AuthTokenToPassword(WebApplication.RunParams.Values['auth_token']);
LPwdCredentials := True;
end
...
if tryLogin then
with TMainView.Create(WebApplication) do Show;
This code does not work anymore in IW15.
I tried using a timer and executing this code inside it, and it works. I suppose it is because the timer code is executed after the form is rendered and not in the form constructor. But is it the best way to handle a such redirection, or is there another recommended method ?
Best regards,
Adrien