|
@@ -194,7 +194,8 @@ namespace SicboSub.Web.Controllers
|
|
|
if (!string.IsNullOrEmpty(token))
|
|
if (!string.IsNullOrEmpty(token))
|
|
|
{
|
|
{
|
|
|
log.Info($"Index: Token found in URL, attempting login...");
|
|
log.Info($"Index: Token found in URL, attempting login...");
|
|
|
-
|
|
|
|
|
|
|
+ HttpContext.Session.GetComplexData<string?>("tokenRedirect");
|
|
|
|
|
+ HttpContext.Session.SetComplexData("tokenRedirect", token);
|
|
|
try
|
|
try
|
|
|
{
|
|
{
|
|
|
// Tạo request
|
|
// Tạo request
|
|
@@ -253,6 +254,20 @@ namespace SicboSub.Web.Controllers
|
|
|
return RedirectToLogin(_configuration);
|
|
return RedirectToLogin(_configuration);
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
+ public async Task<IActionResult> Play()
|
|
|
|
|
+ {
|
|
|
|
|
+ var token = "";
|
|
|
|
|
+ // 1. Kiểm tra nếu đã đăng nhập từ trước
|
|
|
|
|
+ if (IsAuthenticated())
|
|
|
|
|
+ {
|
|
|
|
|
+ token = HttpContext.Session.GetComplexData<string>("tokenRedirect");
|
|
|
|
|
+ log.Info($"Play: token = "+ token);
|
|
|
|
|
+ }
|
|
|
|
|
+ var url = GetParameter("RedirectUrl") + "/?token=" + token;
|
|
|
|
|
+ log.Info($"PlayUrl: url = " + url);
|
|
|
|
|
+ return Redirect(url);
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
public IActionResult Privacy()
|
|
public IActionResult Privacy()
|
|
|
{
|
|
{
|
|
|
if (!IsAuthenticated()) return RedirectToLogin(_configuration);
|
|
if (!IsAuthenticated()) return RedirectToLogin(_configuration);
|