Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Don't logout if deviceId is null #6038

Merged
merged 1 commit into from May 24, 2021
Merged
Changes from all commits
Commits
File filter
Filter file types
Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.

Always

Just for now

@@ -1540,23 +1540,26 @@ private string GetAuthorizationToken(User user, string deviceId, string app, str
Limit = 1
}).Items.FirstOrDefault();

var allExistingForDevice = _authRepo.Get(
new AuthenticationInfoQuery
{
DeviceId = deviceId
}).Items;

foreach (var auth in allExistingForDevice)
if (!string.IsNullOrEmpty(deviceId))
{
if (existing == null || !string.Equals(auth.AccessToken, existing.AccessToken, StringComparison.Ordinal))
{
try
var allExistingForDevice = _authRepo.Get(
new AuthenticationInfoQuery
{
Logout(auth);
}
catch (Exception ex)
DeviceId = deviceId
}).Items;

foreach (var auth in allExistingForDevice)
{
if (existing == null || !string.Equals(auth.AccessToken, existing.AccessToken, StringComparison.Ordinal))
{
_logger.LogError(ex, "Error while logging out.");
try
{
Logout(auth);
}
catch (Exception ex)
{
_logger.LogError(ex, "Error while logging out.");
}
}
}
}
ProTip! Use n and p to navigate between commits in a pull request.