djtheredstoner / devauth Goto Github PK
View Code? Open in Web Editor NEWSafely authenticate Microsoft and Mojang accounts in development environments.
License: MIT License
Safely authenticate Microsoft and Mojang accounts in development environments.
License: MIT License
Because legacy forge is stupid and lets you load coremods more than once (for example, from maven and from a jar).
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
?
The default config in .devauth/config.toml has a missing c
in defaultAccount
. This is very annoying considering its a small typo. Please fix
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:?]
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
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
Add a Encryption PR.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.