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

User Authentication Issue #14

Open
Benz56 opened this issue Jan 23, 2021 · 2 comments
Open

User Authentication Issue #14

Benz56 opened this issue Jan 23, 2021 · 2 comments

Comments

@Benz56
Copy link

Benz56 commented Jan 23, 2021

Authenticating a user via the API results in an NPE.

Using spigotsite-api version 0.3.2-SNAPSHOT and spigotsite version 0.4.1-SNAPSHOT.

Authentication:

spigotUser = spigotSiteCore.getUserManager().authenticate(
        username,
        password,
        twofa
);

Causing

java.lang.NullPointerException
	at be.maximvdw.spigotsite.user.SpigotUserManager.authenticate(SpigotUserManager.java:101)
	at be.maximvdw.spigotsite.user.SpigotUserManager.authenticate(SpigotUserManager.java:78)

Caused by the response values being null. Exceptions occurs here:

if (res.getResponseURL().toString().startsWith("https://www.spigotmc.org/login/two-step")) {

Where the response is:
Debug

Similar to issue #13 with some extra details.

@Benz56
Copy link
Author

Benz56 commented Jan 24, 2021

Some more details:
The post method in the JsoupRequest class file throws an exception. The HTTP response code of the request is 503. This is most likely caused by Cloudflare blocking non-human requests.

@Osiris-Team
Copy link

@Benz56 yep. More details here: Osiris-Team/AutoPlug-Client#6

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

No branches or pull requests

2 participants