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

Bugfix for expired trusted browser #451

Open
wants to merge 1 commit into
base: develop
Choose a base branch
from

Conversation

eskour
Copy link
Contributor

@eskour eskour commented Oct 24, 2024

IsExistingBrowser should be false if the current browser's identifier is expired, by date-comparing using MfaSessionExpirationDate.

@@ -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;
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

θα έλεγα οτι πρέπει να πάει στην GetDeviceById()

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

να σου πω την αληθεια μου φαινεται πιο λογικο να μεινει εκει που ειναι, γιατι το method ειναι GetDeviceById, οχι GetTrustedDeviceById ή κατι τετοιο...

Copy link
Collaborator

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

Copy link
Collaborator

@pthanos pthanos left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

πρέπει να μπει σε επιπεδο getDevideByID ο έλεγχος.

@cleftheris
Copy link
Contributor

Καταρχάς πρόκειται για αλλαγή που δεν έχει parity με το identity server part (new part). Οπότε δε μπορώ να τη δεχτώ. Δευτέρον δε καταλαβαίνω το scenario αν δε μου το εξηγήσει κάποιος σε βάθος. Μέχρι να το δώ να κάνει reproduce και να καταλάβω το scenario δε μπορώ να το κλείσω.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants