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

Authentication Not Recognized for 2 Factor Nintendo Users #5

Open
patrick-theprogrammer opened this issue Nov 28, 2023 · 10 comments
Open
Labels
bug Something isn't working

Comments

@patrick-theprogrammer
Copy link

patrick-theprogrammer commented Nov 28, 2023

First off thanks for this awesome add on! Enjoying it.

Im a developer by trade and just now getting into open source powershell and c# development, so I did some detailed analysis and might have time to take a stab at a fix myself if you’d like.

Describe the bug
Nintendo has issues honoring a full path post_login_redirect_uri url parameter when the user has two factor authentication enabled. It only reads the path and I guess hardcodes the domain, I ended up getting redirected to accounts.nintendo.com/my/ instead of the intended API domain ec.nintendo.com/my/.

This means that the token json file doesn’t get created since the login is recognized as successful based on the web view loading the redirect url.

A simple fix might be to just consider accounts.nintendo.com/my as the user being logged in in the web view. Or more thorough check the cookies on each web view change until some Nintendo auth ones are there.

To Reproduce
Enable 2 factor authentication on your Nintendo account. Reinstall the addon or delete the token file, try to authenticate with that account. Personally I tried authenticator and passkey based methods, I’m assuming this issue would be the same for an SMS based method too. Note page not found error and the addon not recognizing you are authenticated.

Workaround
As a workaround if I create an empty token.json file in the addon data directory and then restart playnite, everything WAI afterwards.

Diagnostics ID
Please generate diagnostics package from "About Playnite" menu and attach identifier you received. If the issue is a crash bug, you can generate diag. package directly from crash dialog.
f5a5149c-3a35-45ee-b848-f8838bfb51a0

@patrick-theprogrammer patrick-theprogrammer added the bug Something isn't working label Nov 28, 2023
@XenorPLxx
Copy link
Owner

Thanks for the detailed report, I'll try to implement at least the simple fix shortly and release it.

@vitaminj
Copy link

vitaminj commented Jan 6, 2024

I worked around this by right-clicking and pressing back a couple of times and then the N website got to an earlier page, realised it was logged in and auto-redirected to the ec.nintendo domain that the plugin expected

@celticsamurai
Copy link

I've tried both workarounds, and they don't seem to work for me. The blank json doesn't seem to change anything, and I'm not able to go back with right clicking on the webpage when it asks to log in.

@CuddleBear92
Copy link

CuddleBear92 commented Apr 23, 2024

just to comment on this one. the workaround worked fine. just login with your 2FA or Passkey and then right click and click back a couple of times until you get to the ec.nintendo.com/my/ page and it will automatically close the window and log you in.

@8-BitAnt
Copy link

8-BitAnt commented Jun 1, 2024

I am also having issues getting this to work no matter what I do... any other workarounds?

@XenorPLxx
Copy link
Owner

I've released a new version that should work: https://github.com/XenorPLxx/playnite-library-nintendo/releases/tag/1.7
If you'll still have issues, you might need to go to plugins/installed/libraries/nintendo, click data folder and remove token.json, go to Playnite/settings/advanced, click clear web cache. Playnite will then restart and you should be able to log in successfully. During testing, I had to do that on my main Playnite, but for dev instances it wasn't necessary.

@koelle25
Copy link

I've released a new version that should work: https://github.com/XenorPLxx/playnite-library-nintendo/releases/tag/1.7 If you'll still have issues, you might need to go to plugins/installed/libraries/nintendo, click data folder and remove token.json, go to Playnite/settings/advanced, click clear web cache. Playnite will then restart and you should be able to log in successfully. During testing, I had to do that on my main Playnite, but for dev instances it wasn't necessary.

Thank you! I can report that this procedure worked for me 😃

@Dobbelklick
Copy link

Dobbelklick commented Jul 6, 2024

Same problem here and I'm using version 1.7. It worked for one connection after installation and now I can't authenticate anymore. It asks for password, 2FA and all, but won't change to "authenticated". I'm using a German Nintendo account if it matters. Workaround with empty token.json works though.

edit: And It's unauthorized again... :(

@jaredcat
Copy link

go to plugins/installed/libraries/nintendo, click data folder and remove token.json, go to Playnite/settings/advanced, click clear web cache. Playnite will then restart and you should be able to log in successfully.

Did not work for me. After using 2FA code the window closes, after a few seconds the plugin returns to saying Requires authentication

@XenorPLxx
Copy link
Owner

Yea seems like Nintendo broke something again, ill investigate

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

9 participants