box-ios-sdk icon indicating copy to clipboard operation
box-ios-sdk copied to clipboard

OAuth and 2FA not working

Open theli opened this issue 4 years ago • 4 comments

Description of the Issue

Authorization flow returns error for accounts with 2FA enabled. The test can be run on a sample app, which accompanies BoxSDK.

Steps to Reproduce

  1. Create test app in Developer Console
  2. Follow the guide https://github.com/box/box-java-sdk/ and setup client_id, secret and URL scheme in the sample app "OAuth2SampleApp"
  3. Login with account that has 2FA enabled
  4. See error as on the attached screenshot.

Expected Behavior

Authorization flow completed without error

Screenshots

2fa_error

Versions Used

iOS SDK: 4.3.0 iOS: 14.3 Xcode: 12.3

theli avatar Feb 19 '21 13:02 theli

Hi @theli,

Thanks for submitting this Issue! We will take a look and get back to you ASAP!

@PJSimon

PJSimon avatar Feb 19 '21 18:02 PJSimon

Hi @PJSimon,

Could you confirm this is a bug and if there is a plan to fix it? I consider it moderate to high importance because it does not allow to sign in the entire segment of users who have 2FA enabled.

theli avatar Mar 03 '21 10:03 theli

This seems like a quite severe issue and it's still not fixed after a year, weird 🤔 Is there a workaround that people use?

FYI @arjankowski

robertwijas avatar Sep 05 '22 13:09 robertwijas

Hi @robertwijas, sorry for the inconvenience. We'll do our best to fix it later this month.

arjankowski avatar Sep 06 '22 08:09 arjankowski

Hello,

Do you have plans to fix this? No users with 2FA enabled can log in in Box anymore.

The attached project reproduces the problem (I mean, it's just a sample project that shows that I do nothing else than trying to create a Box client with OAuth).

It looks like the fix is an incorrect redirect URL on the server-side.

As described by @theli in their support forum issue, instead of redirecting to the REDIRECT_URL, the OAuth session is redirected to https://m.box.com/api/oauth2/authorize?client_id=xxxxxxxxxxxxxxx&redirect_uri=REDIRECT_URI&response_type=code instead.

Thanks!

bvirlet avatar Oct 20 '22 09:10 bvirlet

Hi @bvirlet ,

The SDK team has already investigated this problem and found its root cause. As the problem is on the backend, we forwarded this issue to the appropriate team with our fix proposal. We are now waiting for a reply.

As soon as they fix this, we will let you know.

Regards, Artur

arjankowski avatar Oct 20 '22 10:10 arjankowski

Thank you Artur. Do you have an ETA on a fix?

bvirlet avatar Oct 20 '22 11:10 bvirlet

Hi @bvirlet, I haven't got any answer about ETA yet. As soon as I get any answer, I will let you know.

arjankowski avatar Oct 24 '22 10:10 arjankowski

This issue has been automatically marked as stale because it has not been updated in the last 30 days. It will be closed if no further activity occurs within the next 7 days. Feel free to reach out or mention Box SDK team member for further help and resources if they are needed.

stale[bot] avatar Dec 19 '22 19:12 stale[bot]

This issue shouldn’t be closed as it helps track an ongoing issue.

bvirlet avatar Dec 19 '22 21:12 bvirlet

Hi guys,

Is there an update on this?

Thanks!

bvirlet avatar Feb 01 '23 15:02 bvirlet

Any update on this issue? I used the iOS Content SDK.

magicboker avatar Feb 03 '23 08:02 magicboker

I just received a message from the backend team who were working on this, that the fix has been deployed to production. I tested it and it looks like it's finally working, so I'm closing this ticket.

We apologize for making you wait so long for the fix. Regards

arjankowski avatar Feb 17 '23 18:02 arjankowski