Skip to content

LG-10691: ensure user is authenticated in phone controller before accessing session#9082

Merged
amirbey merged 5 commits intomainfrom
amirbey/LG-10691-user-session-not-present
Aug 25, 2023
Merged

LG-10691: ensure user is authenticated in phone controller before accessing session#9082
amirbey merged 5 commits intomainfrom
amirbey/LG-10691-user-session-not-present

Conversation

@amirbey
Copy link
Contributor

@amirbey amirbey commented Aug 24, 2023

🎫 Ticket

LG-10691

🛠 Summary of changes

Call confirm_two_factor_authenticated filters directly in controllers including PhoneOtpRateLimitable and PhoneOtpSendable concerns.

📜 Testing Plan

  1. Start IDV
  2. Select Send Link
  3. Navigate to /test/telephony and open the link on the desktop in a new incognito window
  4. Submit photos
  5. On the capture complete screen (same Incognito window), navigate to /verify/phone
  6. Verify user is directed to root/login page.

@amirbey amirbey changed the title fix ordering of confirm_two_factor_authenticated filter in phone cont… LG-10691: ensure user is authenticated in phone controller before accessing session Aug 25, 2023
@amirbey amirbey marked this pull request as ready for review August 25, 2023 15:15
@amirbey amirbey requested a review from a team August 25, 2023 15:15
Copy link
Contributor

@soniaconnolly soniaconnolly left a comment

Choose a reason for hiding this comment

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

I checked where else PhoneOtpRateLimitable is used, and looks like we might need to add :confirm_two_factor_authenticated to ResendOtpController. Nevermind, you got it, I was looking in main. I'm curious why the action was put in the Concern originally.

LGTM. I ran the spec in main, saw it fail, and then ran it on this branch and saw it succeed.

@amirbey amirbey self-assigned this Aug 25, 2023
@amirbey amirbey merged commit 09c9413 into main Aug 25, 2023
@amirbey amirbey deleted the amirbey/LG-10691-user-session-not-present branch August 25, 2023 17:09
@mdiarra3 mdiarra3 mentioned this pull request Aug 29, 2023
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