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

OAuth logins with 2FA don't complete first time #1191

Closed
benjojo opened this issue Jun 15, 2022 · 8 comments · Fixed by #1329
Closed

OAuth logins with 2FA don't complete first time #1191

benjojo opened this issue Jun 15, 2022 · 8 comments · Fixed by #1329
Assignees
Labels
bug Time:Minor Up to 4 hours
Milestone

Comments

@benjojo
Copy link

benjojo commented Jun 15, 2022

Describe the bug

When a user is authenticating to another site via the peeringdb OAuth system, and they are not logged in to PeeringDB already, and they have 2FA enabled, the flow dumps them into the main page after 2FA, and not the OAuth flow.

To Reproduce
Steps to reproduce the behavior:

  1. Launch private browsing window to ensure clean, logged out session.
  2. Go to https://bgp.tools/authed/manage-peering to login to bgp.tools with PeeringDB (with a 2FA account)
  3. Note how you are dumped to the front page rather than the expected permissions screen.

Expected behavior

For 2FA users to get the permissions screen after 2FA auth, like the non 2FA users do

Who is affected by the problem?

bgp.tools users, and probably anyone else using OAuth logins

What is the impact?

People get confused during login flows. Making PeeringDB OAuth harder to use.

Are there security concerns?

At least one person disabled 2FA because of this

@leovegoda
Copy link
Contributor

This looks important in the context of #1180

@vegu
Copy link
Contributor

vegu commented Jun 15, 2022

I was not able to reproduce this while using OTP for 2FA approach.

However, i was able to reproduce this while using U2F for 2FA approach.

So it seems like a bug with the latter.

@vegu vegu added the bug label Jun 15, 2022
@vegu
Copy link
Contributor

vegu commented Jun 15, 2022

@benjojo were you using a U2F device (yubikey, fingerprint scanner, os pin, etc.,) or a one-time-password (google authenticator) as 2FA method?

@benjojo
Copy link
Author

benjojo commented Jun 15, 2022 via email

@benjojo
Copy link
Author

benjojo commented Jun 15, 2022

It was a U2F device yes

@vegu vegu added the Time:Minor Up to 4 hours label Jun 16, 2022
@arnoldnipper arnoldnipper added this to the 1 Decide milestone Jul 4, 2022
@arnoldnipper arnoldnipper self-assigned this Jul 4, 2022
@arnoldnipper
Copy link
Contributor

Routed through to 3a as identified as a bug by a developer

@mcmanuss8
Copy link
Contributor

+1

@ChrisMacNaughton
Copy link

Enabling TOTP as well as U2F seems to allow me to login via OAUTH

@vegu vegu mentioned this issue Feb 14, 2023
vegu added a commit that referenced this issue Feb 15, 2023
* fix next redirect when using U2F 2FA auth (#1191)

* Added self identifier to API

* fix migrations hierarchy after merging in previous support branch

* campus object

Co-authored-by: Stefan Pratter <stefan@20c.com>

* fix out of bound error message
add city / country to campus view

* fix tests

* relock poetry

* linting

* linting

* fix docs regen

* regen docs

* linting

* refactor self entity view to support carrier and campus object types and also make it easier to support additional object types in the future

* remove debug message

---------

Co-authored-by: Gajanan Patil <dipaksavaliya.python@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Time:Minor Up to 4 hours
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants