-
Notifications
You must be signed in to change notification settings - Fork 8
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
Bugfix for expired trusted browser #451
base: develop
Are you sure you want to change the base?
Conversation
@@ -122,7 +122,7 @@ public async Task<MfaLoginViewModel> BuildMfaLoginViewModelAsync(string returnUr | |||
var isExistingBrowser = false; | |||
if (!string.IsNullOrWhiteSpace(deviceIdentifier.Value)) { | |||
var browserDevice = await _userManager.GetDeviceByIdAsync(user, deviceIdentifier.Value); | |||
isExistingBrowser = browserDevice is not null; | |||
isExistingBrowser = browserDevice is not null && browserDevice.MfaSessionExpirationDate > DateTimeOffset.UtcNow; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
θα έλεγα οτι πρέπει να πάει στην GetDeviceById()
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
να σου πω την αληθεια μου φαινεται πιο λογικο να μεινει εκει που ειναι, γιατι το method ειναι GetDeviceById
, οχι GetTrustedDeviceById
ή κατι τετοιο...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
επισης ας ένα isValid ή isExpired helper πάνω στο device class. Ας πει τι θέλει ο @cleftheris
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
πρέπει να μπει σε επιπεδο getDevideByID ο έλεγχος.
Καταρχάς πρόκειται για αλλαγή που δεν έχει parity με το identity server part (new part). Οπότε δε μπορώ να τη δεχτώ. Δευτέρον δε καταλαβαίνω το scenario αν δε μου το εξηγήσει κάποιος σε βάθος. Μέχρι να το δώ να κάνει reproduce και να καταλάβω το scenario δε μπορώ να το κλείσω. |
IsExistingBrowser
should be false if the current browser's identifier is expired, by date-comparing usingMfaSessionExpirationDate
.