Changed the logic to check if logout done by mobile APP
This commit is contained in:
parent
5538c3ae25
commit
f6ce8dd4f6
@ -390,8 +390,8 @@ namespace MarcoBMS.Services.Controllers
|
|||||||
await _refreshTokenService.BlacklistJwtTokenAsync(jwtToken);
|
await _refreshTokenService.BlacklistJwtTokenAsync(jwtToken);
|
||||||
_logger.LogInfo("JWT access token blacklisted successfully");
|
_logger.LogInfo("JWT access token blacklisted successfully");
|
||||||
}
|
}
|
||||||
string? origin = HttpContext.Request.Headers["Origin"].FirstOrDefault();
|
string userAgent = HttpContext.Request.Headers["User-Agent"].ToString();
|
||||||
if (string.IsNullOrWhiteSpace(origin))
|
if (userAgent.Contains("Dart"))
|
||||||
{
|
{
|
||||||
var fcmTokenMapping = await _context.FCMTokenMappings.FirstOrDefaultAsync(ft => ft.EmployeeId == loggedInEmployee.Id && ft.TenantId == tenentId);
|
var fcmTokenMapping = await _context.FCMTokenMappings.FirstOrDefaultAsync(ft => ft.EmployeeId == loggedInEmployee.Id && ft.TenantId == tenentId);
|
||||||
if (fcmTokenMapping != null)
|
if (fcmTokenMapping != null)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user