@@ -147,9 +147,8 @@ public async Task<RedirectResult> TwitchLogin([FromQuery] string code, [FromServ
147147 /// <returns>
148148 /// A redirect to the nullinside website.
149149 /// Errors:
150- /// 2 = Internal error generating token.
151- /// 3 = Code was invalid
152- /// 4 = Twitch account has no email
150+ /// 1 = Internal error
151+ /// 2 = Error with twitch
153152 /// </returns>
154153 [ AllowAnonymous ]
155154 [ HttpGet ]
@@ -160,12 +159,12 @@ public async Task<RedirectResult> TwitchStreamingToolsLogin([FromQuery] string c
160159 // credentials question we're being asked.
161160 string ? siteUrl = _configuration . GetValue < string > ( "Api:SiteUrl" ) ;
162161 if ( ! _webSockets . WebSockets . ContainsKey ( state ) ) {
163- return Redirect ( $ "{ siteUrl } /user/login/desktop?error=2 ") ;
162+ return Redirect ( $ "{ siteUrl } /user/login/desktop?error=1 ") ;
164163 }
165164
166165 // Since someone already warned us this request was coming, create an oauth token from the code we received.
167166 if ( null == await api . CreateAccessToken ( code , token ) ) {
168- return Redirect ( $ "{ siteUrl } /user/login/desktop?error=3 ") ;
167+ return Redirect ( $ "{ siteUrl } /user/login/desktop?error=2 ") ;
169168 }
170169
171170 // The "someone" that warned us this request was coming has been sitting around waiting for an answer on a web
@@ -184,7 +183,7 @@ public async Task<RedirectResult> TwitchStreamingToolsLogin([FromQuery] string c
184183 socket . Dispose ( ) ;
185184 }
186185 catch {
187- return Redirect ( $ "{ siteUrl } /user/login/desktop?error=2 ") ;
186+ return Redirect ( $ "{ siteUrl } /user/login/desktop?error=1 ") ;
188187 }
189188
190189 return Redirect ( $ "{ siteUrl } /user/login/desktop") ;
0 commit comments