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

Login flow with 2fa enabled via modrinth.gg fails #3188

Closed
2 tasks done
isXander opened this issue Jan 25, 2025 · 1 comment · Fixed by #3191
Closed
2 tasks done

Login flow with 2fa enabled via modrinth.gg fails #3188

isXander opened this issue Jan 25, 2025 · 1 comment · Fixed by #3191
Labels
bug Something isn't working web Relates to Modrinth.com web frontend

Comments

@isXander
Copy link
Contributor

Please confirm the following.

What browsers are you seeing the problem on?

Firefox

Describe the bug

When signing in to modrinth from the https://modrinth.gg page, the flow is interrupted when it should have opened the 2FA page, instead, it flashes with the main modrinth.gg page and then puts me back on the login page.

When repeating the reproduction steps from https://modrinth.com , I did not have this issue.

Steps to reproduce

  1. Ensure you are signed out of Modrinth, and have 2FA enabled on your account
  2. Go to https://modrinth.gg
  3. Press 'Sign in'
  4. Use any of the oauth login methods (I didn't test username/password)
  5. Proceed through the 3rd party oauth and authorise
  6. See, you are now back on the login page.

Expected behavior

It should correctly continue with the login flow and show the 2FA page.

Additional context

No response

@isXander isXander added bug Something isn't working web Relates to Modrinth.com web frontend labels Jan 25, 2025
@Erb3
Copy link
Contributor

Erb3 commented Jan 25, 2025

Able to reproduce. Caused by the oAuth redirect URI being set to Modrinth's sign-in page's redirect query param. Instead the oAuth redirect URI should be the sign-in page URL + redirect query param set.

-https://api.modrinth.com/v2/auth/init?provider=github&url=https://modrinth.com/servers?plan=small
+https://api.modrinth.com/v2/auth/init?provider=github&url=https://modrinth.com/auth/sign-in%3Fredirect%3Dhttps%3A%2F%2Fmodrinth%2Ecom%2Fservers%3Fplan%3Dsmall

Erb3 added a commit to Erb3-forked/modrinth that referenced this issue Jan 26, 2025
- Fixes modrinth#3188
- Refactors if-else statement into ternary
github-merge-queue bot pushed a commit that referenced this issue Jan 29, 2025
- Fixes #3188
- Refactors if-else statement into ternary
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working web Relates to Modrinth.com web frontend
Development

Successfully merging a pull request may close this issue.

2 participants