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

Add InteractionMode property to otp purpose during device authentication #434

Merged
merged 3 commits into from
Sep 23, 2024

Conversation

dkarkanas
Copy link
Contributor

We need to differentiate between the 4-pin and biometric purposes during device registration.

Users completing the process in less than 30 seconds are encountering the error: Last token has not expired yet. Please wait a few seconds and try again.

@dkarkanas
Copy link
Contributor Author

This fixes the brute force control for otp in device authentcation. The proper solution requires a SecurityStamp to UserDevice table, and use this stamp to the otp purpose

Copy link
Contributor

@cleftheris cleftheris left a comment

Choose a reason for hiding this comment

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

It is important to know that the only issue here is not consuming the otp after successful registration. This could be done by creating and maintaining a SecurityStamp on the device record itself that would force the otp to change after the device registration flow completes successfully. At the moment discriminating the purpose is good enough.

On a sidenote the bad request is triggered by a brute force control we have inplace so that for the same purpose we dont spam the sms gateway. It is implemented using a simple cache

@dkarkanas dkarkanas merged commit 072384a into develop Sep 23, 2024
1 check passed
@dkarkanas dkarkanas deleted the feature/device-registration-otp-purpose branch September 23, 2024 10:22
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.

2 participants