@@ -62,25 +62,25 @@ public LoginController(INullinsideContext dbContext, IConfiguration configuratio
62
62
public async Task < IActionResult > TwitchLogin ( [ FromQuery ] string code , [ FromServices ] ITwitchApiProxy api , CancellationToken token ) {
63
63
string ? siteUrl = _configuration . GetValue < string > ( "Api:SiteUrl" ) ;
64
64
if ( null == await api . CreateAccessToken ( code , token ) . ConfigureAwait ( false ) ) {
65
- return Redirect ( $ "{ siteUrl } /twitch- bot/config?error={ TwitchBotLoginErrors . TWITCH_ERROR_WITH_TOKEN } ") ;
65
+ return Redirect ( $ "{ siteUrl } /twitch/ bot/config?error={ TwitchBotLoginErrors . TWITCH_ERROR_WITH_TOKEN } ") ;
66
66
}
67
67
68
68
string ? email = await api . GetUserEmail ( token ) . ConfigureAwait ( false ) ;
69
69
if ( string . IsNullOrWhiteSpace ( email ) ) {
70
- return Redirect ( $ "{ siteUrl } /twitch- bot/config?error={ TwitchBotLoginErrors . TWITCH_ACCOUNT_HAS_NO_EMAIL } ") ;
70
+ return Redirect ( $ "{ siteUrl } /twitch/ bot/config?error={ TwitchBotLoginErrors . TWITCH_ACCOUNT_HAS_NO_EMAIL } ") ;
71
71
}
72
72
73
73
User ? user = await api . GetUser ( token ) . ConfigureAwait ( false ) ;
74
74
if ( string . IsNullOrWhiteSpace ( user ? . Login ) || string . IsNullOrWhiteSpace ( user . Id ) ) {
75
- return Redirect ( $ "{ siteUrl } /twitch- bot/config?error={ TwitchBotLoginErrors . INTERNAL_ERROR } ") ;
75
+ return Redirect ( $ "{ siteUrl } /twitch/ bot/config?error={ TwitchBotLoginErrors . INTERNAL_ERROR } ") ;
76
76
}
77
77
78
78
string ? bearerToken = await UserHelpers . GenerateTokenAndSaveToDatabase ( _dbContext , email , token , api . OAuth ? . AccessToken ,
79
79
api . OAuth ? . RefreshToken , api . OAuth ? . ExpiresUtc , user . Login , user . Id ) . ConfigureAwait ( false ) ;
80
80
if ( string . IsNullOrWhiteSpace ( bearerToken ) ) {
81
- return Redirect ( $ "{ siteUrl } /twitch- bot/config?error={ TwitchBotLoginErrors . INTERNAL_ERROR } ") ;
81
+ return Redirect ( $ "{ siteUrl } /twitch/ bot/config?error={ TwitchBotLoginErrors . INTERNAL_ERROR } ") ;
82
82
}
83
83
84
- return Redirect ( $ "{ siteUrl } /twitch- bot/config?token={ bearerToken } ") ;
84
+ return Redirect ( $ "{ siteUrl } /twitch/ bot/config?token={ bearerToken } ") ;
85
85
}
86
86
}
0 commit comments