- This topic has 8 replies, 2 voices, and was last updated 3 years, 6 months ago by
kimbomadsen.
-
AuthorPosts
-
-
December 1, 2021 at 03:25 #56056
Babis MichaelParticipantHello,
Any ideas why i get double logins on a couple of clients (randomly) with mwaoAutoLogin ?
From logs i see the same ip and port:
01/12/2021 04:21| 79.129.108.174:9581 Login [HELENGAR]
01/12/2021 04:21| 79.129.108.174:9581 Login [HELENGAR]Thank you
-
This topic was modified 4 years ago by
Babis Michael.
-
This topic was modified 4 years ago by
Babis Michael.
-
This topic was modified 4 years ago by
Babis Michael.
-
This topic was modified 4 years ago by
Babis Michael.
-
This topic was modified 4 years ago by
-
December 3, 2021 at 00:24 #56065
kimbomadsen
KeymasterHi,
Most likely because the client do not provide the Token for subsequent requests. The token should be returned to the client upon first request where you log the client in and all the client’s requests should provide that token instead of the username/password.
Kim/C4D
-
December 3, 2021 at 03:06 #56067
Babis MichaelParticipantHello,
I do clear the token if i detect disconnection from the server because if i do not do that the Server’s AuthorizationManagerLogin will not fire when the server restarts.
Example:
Run the Server
Run the Client
Client connects and Server’s AuthorizationManagerLogin will fire (Client.Token will get a value)
Close Server
Run Server
Client will connect but AuthorizationManagerLogin will not fire.Thank you
-
December 22, 2021 at 02:19 #56119
Babis MichaelParticipantKim ?
-
-
-
December 13, 2021 at 13:01 #56114
Babis MichaelParticipantUP
-
December 31, 2021 at 01:08 #56128
kimbomadsen
KeymasterThe only thing I can think of, is that the clients somehow are using/getting the same token?
-
March 30, 2022 at 08:39 #56367
Babis MichaelParticipantHello Kim,
Checked that and no!The “Trace” of duplicate login:
30/03/2022 09:31| 635450D7EE5A422991BB89EDA6132A6C TRACE: MyUser:33088) Login: Logged in. Actor=MyUser:33088, Role=USER, Location=127.0.0.1:33088 At(UTC)=30/3/2022 6:31:56 πμ
30/03/2022 09:47| 635450D7EE5A422991BB89EDA6132A6C TRACE: MyUser:33088) Logout: LoginToken=635450D7EE5A422991BB89EDA6132A6C
30/03/2022 09:47| 404D861FAB464DBD9D832D1B150AD166 TRACE: MyUser:53421) Login: Logged in. Actor=MyUser:53421, Role=USER, Location=127.0.0.1:53421 At(UTC)=30/3/2022 6:47:43 πμ
30/03/2022 10:06| 404D861FAB464DBD9D832D1B150AD166 TRACE: MyUser:53421) Logout: LoginToken=404D861FAB464DBD9D832D1B150AD166
30/03/2022 10:08| A41785AAF86E4B6CA4B24DA82ACBA9E6 TRACE: MyUser:54034) Login: Logged in. Actor=MyUser:54034, Role=USER, Location=127.0.0.1:54034 At(UTC)=30/3/2022 7:08:02 πμ
30/03/2022 10:08| TRACE: MyUser:54034) Login: Actor already logged in. Actor MyUser:54034, Role=USER, At(UTC)=30/3/2022 7:08:02 πμ // <— HERE!!! It attempts for the 2nd time to login but it’s already logged as you can see above
30/03/2022 10:08| A41785AAF86E4B6CA4B24DA82ACBA9E6 TRACE: MyUser:54034) Logout: LoginToken=A41785AAF86E4B6CA4B24DA82ACBA9E6
30/03/2022 10:08| 7B606826CA9E4F3B84BA89CEDC590971 TRACE: MyUser:54036) Login: Logged in. Actor=MyUser:54036, Role=USER, Location=127.0.0.1:54036 At(UTC)=30/3/2022 7:08:03 πμIf the user is already logged in it will still call “OnLoginSucces” so can you add a flags to “ctx” to know that the user is already logged ?
eg:ctx.AlreadyLogged := True; // <– add this new variable
ctx.Message:=’Already logged in’;
ctx.TraceMessage:=’Login: Actor already logged in. Actor ‘+ctx.Actor.Name+’, Role=’+ctx.Role.Name+’, At(UTC)=’+DateTimeToStr(Result.LastAuthorized);
DoOnLoginSuccess(ctx);Thank you
-
This reply was modified 3 years, 9 months ago by
Babis Michael.
-
March 30, 2022 at 09:47 #56369
Babis MichaelParticipantI found a better solution!
Since our user is already logged in we shouldn’t call DoOnLoginSuccess(ctx); because it’s already called the first time!ctx.TraceMessage:=’Login: Actor already logged in. Actor ‘+ctx.Actor.Name+’, Role=’+ctx.Role.Name+’, At(UTC)=’+DateTimeToStr(Result.LastAuthorized);
//DoOnLoginSuccess(ctx); <– Remove me!-
This reply was modified 3 years, 9 months ago by
Babis Michael.
-
June 7, 2022 at 00:03 #56501
kimbomadsen
KeymasterI agree on your last suggestion so will remove the call to DoOnLoginSuccess when the user is already logged in.
/Kim/C4D
-
This reply was modified 3 years, 9 months ago by
-
This reply was modified 3 years, 9 months ago by
-
-
-
AuthorPosts
- You must be logged in to reply to this topic.
