@@ -131,55 +131,6 @@ public async Task ContinueLogin(LoginResult loginResult, string code)
131
131
loginResult . Callback ( result . Code == LoginResultCodes . Success , result . Message ) ;
132
132
}
133
133
134
- public async Task < bool > LoginAsync ( string username , string password , Func < LoginResult , string > need2faCode )
135
- {
136
- Guard . ArgumentNotNull ( need2faCode , "need2faCode" ) ;
137
-
138
- LoginResultData res = null ;
139
- try
140
- {
141
- res = await loginManager . Login ( OriginalUrl , username , password ) ;
142
- }
143
- catch ( Exception )
144
- {
145
- return false ;
146
- }
147
-
148
- if ( res . Code == LoginResultCodes . CodeRequired )
149
- {
150
- var resultCache = new LoginResult ( res , null , null ) ;
151
- var code = need2faCode ( resultCache ) ;
152
- return await ContinueLoginAsync ( resultCache , need2faCode , code ) ;
153
- }
154
- else
155
- {
156
- return res . Code == LoginResultCodes . Success ;
157
- }
158
- }
159
-
160
- public async Task < bool > ContinueLoginAsync ( LoginResult loginResult , Func < LoginResult , string > need2faCode , string code )
161
- {
162
- LoginResultData result = null ;
163
- try
164
- {
165
- result = await loginManager . ContinueLogin ( loginResult . Data , code ) ;
166
- }
167
- catch ( Exception )
168
- {
169
- return false ;
170
- }
171
-
172
- if ( result . Code == LoginResultCodes . CodeFailed )
173
- {
174
- var resultCache = new LoginResult ( result , null , null ) ;
175
- code = need2faCode ( resultCache ) ;
176
- if ( String . IsNullOrEmpty ( code ) )
177
- return false ;
178
- return await ContinueLoginAsync ( resultCache , need2faCode , code ) ;
179
- }
180
- return result . Code == LoginResultCodes . Success ;
181
- }
182
-
183
134
private async Task < GitHubUser > GetCurrentUser ( )
184
135
{
185
136
//TODO: ONE_USER_LOGIN This assumes we only support one login
0 commit comments