@@ -148,7 +148,7 @@ public async Task<bool> UpdatePassword(string password, string verificationCode)
148148 public async Task < Token ? > GetAffiliateToken ( string authorization )
149149 {
150150 var base64 = Encoding . UTF8 . GetString ( Convert . FromBase64String ( authorization ) ) ;
151- var ( id , password ) = base64 . SplitAsTuple ( ":" ) ;
151+ var ( id , password , regionCode ) = base64 . SplitAsTuple ( ":" ) ;
152152 var db = _services . GetRequiredService < IBotSharpRepository > ( ) ;
153153 var record = db . GetAffiliateUserByPhone ( id ) ;
154154 var isCanLogin = record != null && ! record . IsDisabled && record . Type == UserType . Affiliate ;
@@ -170,7 +170,7 @@ public async Task<bool> UpdatePassword(string password, string verificationCode)
170170 public async Task < Token ? > GetAdminToken ( string authorization )
171171 {
172172 var base64 = Encoding . UTF8 . GetString ( Convert . FromBase64String ( authorization ) ) ;
173- var ( id , password ) = base64 . SplitAsTuple ( ":" ) ;
173+ var ( id , password , regionCode ) = base64 . SplitAsTuple ( ":" ) ;
174174 var db = _services . GetRequiredService < IBotSharpRepository > ( ) ;
175175 var record = db . GetUserByPhone ( id , type : UserType . Internal ) ;
176176 var isCanLogin = record != null && ! record . IsDisabled
@@ -210,13 +210,13 @@ public async Task<bool> UpdatePassword(string password, string verificationCode)
210210 public async Task < Token ? > GetToken ( string authorization )
211211 {
212212 var base64 = Encoding . UTF8 . GetString ( Convert . FromBase64String ( authorization ) ) ;
213- var ( id , password ) = base64 . SplitAsTuple ( ":" ) ;
213+ var ( id , password , regionCode ) = base64 . SplitAsTuple ( ":" ) ;
214214
215215 var db = _services . GetRequiredService < IBotSharpRepository > ( ) ;
216216 var record = id . Contains ( "@" ) ? db . GetUserByEmail ( id ) : db . GetUserByUserName ( id ) ;
217217 if ( record == null )
218218 {
219- record = db . GetUserByPhone ( id ) ;
219+ record = db . GetUserByPhone ( id , regionCode : regionCode ) ;
220220 }
221221
222222 if ( record != null && record . Type == UserType . Affiliate )
0 commit comments