Code Monkey home page Code Monkey logo

devauth's People

Contributors

djtheredstoner avatar gabeperson avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

devauth's Issues

Cannot authenticate under 18 Microsoft Accounts not in a family

Using DevAuth-forge-legacy-0.3.jar with forge 1.8.9.

After authenticating with oauth in a private browser session, the program exits with the following stacktrace:

Caused by: java.lang.RuntimeException: Error logging in
	at me.djtheredstoner.devauth.common.auth.MicrosoftAuthProvider.tryLogin(MicrosoftAuthProvider.java:153) ~[MicrosoftAuthProvider.class:?]
	at me.djtheredstoner.devauth.common.auth.MicrosoftAuthProvider.login(MicrosoftAuthProvider.java:94) ~[MicrosoftAuthProvider.class:?]
	at me.djtheredstoner.devauth.common.DevAuth.login(DevAuth.java:61) ~[DevAuth.class:?]
	at me.djtheredstoner.devauth.common.DevAuth.processArguments(DevAuth.java:34) ~[DevAuth.class:?]
	at me.djtheredstoner.devauth.forge.legacy.ForgeLegacyBootstrap.processArguments(ForgeLegacyBootstrap.java:8) ~[ForgeLegacyBootstrap.class:?]
	at net.minecraft.client.main.Main.main(Main.java) ~[Main.class:?]
	... 12 more
Caused by: java.lang.RuntimeException: Failed to get XSTS token
	at me.djtheredstoner.devauth.common.auth.MicrosoftAuthProvider.getXSTSToken(MicrosoftAuthProvider.java:318) ~[MicrosoftAuthProvider.class:?]
	at me.djtheredstoner.devauth.common.auth.MicrosoftAuthProvider.oauthToMinecraft(MicrosoftAuthProvider.java:159) ~[MicrosoftAuthProvider.class:?]
	at me.djtheredstoner.devauth.common.auth.MicrosoftAuthProvider.tryLogin(MicrosoftAuthProvider.java:143) ~[MicrosoftAuthProvider.class:?]
	at me.djtheredstoner.devauth.common.auth.MicrosoftAuthProvider.login(MicrosoftAuthProvider.java:94) ~[MicrosoftAuthProvider.class:?]
	at me.djtheredstoner.devauth.common.DevAuth.login(DevAuth.java:61) ~[DevAuth.class:?]
	at me.djtheredstoner.devauth.common.DevAuth.processArguments(DevAuth.java:34) ~[DevAuth.class:?]
	at me.djtheredstoner.devauth.forge.legacy.ForgeLegacyBootstrap.processArguments(ForgeLegacyBootstrap.java:8) ~[ForgeLegacyBootstrap.class:?]
	at net.minecraft.client.main.Main.main(Main.java) ~[Main.class:?]
	... 12 more
Caused by: java.lang.RuntimeException: Received invalid response from the server: 401 Unauthorized body: {"Identity":"0","XErr":2148916238,"Message":"","Redirect":"https://start.ui.xboxlive.com/AddChildToFamily"}
	at me.djtheredstoner.devauth.common.auth.MicrosoftAuthProvider.httpError(MicrosoftAuthProvider.java:373) ~[MicrosoftAuthProvider.class:?]
	at me.djtheredstoner.devauth.common.auth.MicrosoftAuthProvider.jsonPostRequest(MicrosoftAuthProvider.java:410) ~[MicrosoftAuthProvider.class:?]
	at me.djtheredstoner.devauth.common.auth.MicrosoftAuthProvider.getXSTSToken(MicrosoftAuthProvider.java:314) ~[MicrosoftAuthProvider.class:?]
	at me.djtheredstoner.devauth.common.auth.MicrosoftAuthProvider.oauthToMinecraft(MicrosoftAuthProvider.java:159) ~[MicrosoftAuthProvider.class:?]
	at me.djtheredstoner.devauth.common.auth.MicrosoftAuthProvider.tryLogin(MicrosoftAuthProvider.java:143) ~[MicrosoftAuthProvider.class:?]
	at me.djtheredstoner.devauth.common.auth.MicrosoftAuthProvider.login(MicrosoftAuthProvider.java:94) ~[MicrosoftAuthProvider.class:?]
	at me.djtheredstoner.devauth.common.DevAuth.login(DevAuth.java:61) ~[DevAuth.class:?]
	at me.djtheredstoner.devauth.common.DevAuth.processArguments(DevAuth.java:34) ~[DevAuth.class:?]
	at me.djtheredstoner.devauth.forge.legacy.ForgeLegacyBootstrap.processArguments(ForgeLegacyBootstrap.java:8) ~[ForgeLegacyBootstrap.class:?]
	at net.minecraft.client.main.Main.main(Main.java) ~[Main.class:?]
	... 12 more

java.lang.RuntimeException

When i try running DevAuth i get: Caused by: java.lang.RuntimeException: Received bad status 400 Bad Request body: {"error":"invalid_request","error_description":"Tokens issued for the 'Single-Page Application' client-type should only be redeemed via cross-origin requests. If your client does not send the Origin header, you should register it as a 'Native' client-type instead.","correlation_id":"c523c866-18f5-4fbb-9aff-e96f6a974c7a"}

I've used both the .jar and the maven dependency, and they both have the same problem

No config-file created

I recently started using DevAuth for the first time and it just wouldn't create a config.toml file, nor the directory. But it wasn't throwing any errors. The only consequence was, that I couldn't use DevAuth and it always logged: 'DevAuth deisabled, not logging in!'. I tried to set the JVM properties, but cmd threw an error that therre was no base class 'devauth.enabled', the IntelliJ menu Help > Edit Custom VM Properties didn't work (I didn't try the Help > Edit Custom Properties, but I figure it wouldn't have worked aswell) and also the Run > Debug... > Edit Configurations > Environment Variables didn't help. I've never used java or the JVM before, but that was what google suggested to change the JVM properties mentioned in the README.md file.
What I had to do to get it working in the end, was to create the directory myself and configure the config.toml file like this:

defaultEnabled = true

defaultAccount = "main"

# An example mojang account
[accounts.main]
type = "microsoft"

[accounts.alt]
type = "microsoft"

I tried backtracking throught the code in the repository to find why it didn't throw any errors or created a default config(DevAuthJava l.33) but couldn't find the reason.
For my project I'm using Java 8 as a Project SDK (if that helps to find the source of the issue) and I'm on Windows 11

NoSuchMethod error when adding microsoft account

Im trying to add a microsoft account currently.
after signing in it says return to game. Then it fails to launch.
Using a normal microsoft account with 2fa
Tried using the already logged in quick login and logging in fully again via a private tab.

Crash log

Caused by: java.lang.NoSuchMethodError: com.google.gson.JsonArray.add(Ljava/lang/String;)V
	at me.djtheredstoner.devauth.common.auth.MicrosoftAuthProvider.getXSTSToken(MicrosoftAuthProvider.java:308) ~[MicrosoftAuthProvider.class:?]
	at me.djtheredstoner.devauth.common.auth.MicrosoftAuthProvider.oauthToMinecraft(MicrosoftAuthProvider.java:159) ~[MicrosoftAuthProvider.class:?]
	at me.djtheredstoner.devauth.common.auth.MicrosoftAuthProvider.tryLogin(MicrosoftAuthProvider.java:143) ~[MicrosoftAuthProvider.class:?]
	at me.djtheredstoner.devauth.common.auth.MicrosoftAuthProvider.login(MicrosoftAuthProvider.java:94) ~[MicrosoftAuthProvider.class:?]
	at me.djtheredstoner.devauth.common.DevAuth.login(DevAuth.java:61) ~[DevAuth.class:?]

Config issue

The default config in .devauth/config.toml has a missing c in defaultAccount. This is very annoying considering its a small typo. Please fix

Feature Request: Support environment variables

Very cool mod and I appreciate you writing it!

I have been using in-game-account-switcher however it's rather clunky to have to select your account every launch. Would it be acceptable to add some environment variables in which the mod could look for?

Perhaps something like MINECRAFT_USERNAME and MINECRAFT_PASSWORD?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.