Skip to content

Error while logging in: 400 Bad Request (Caused by email code login) #23

@nikolayKeniston

Description

@nikolayKeniston

I'm using the following code from the readme, changing java to bedrock:

        HttpClient httpClient = MinecraftAuth.createHttpClient();
        StepFullBedrockSession.FullBedrockSession bedrockSession = MinecraftAuth.BEDROCK_DEVICE_CODE_LOGIN.getFromInput(httpClient, new StepMsaDeviceCode.MsaDeviceCodeCallback(msaDeviceCode -> {
            System.out.println("Go to " + msaDeviceCode.getDirectVerificationUri());
        }));
        System.out.println("Chain: " + bedrockSession.getMcChain());

And I get the following error after entering the code:

Exception in thread "main" net.raphimc.minecraftauth.responsehandler.exception.MsaRequestException: status: 400 Bad Request, error: invalid_grant, error message: The user could not be authenticated or user interaction is required. The user must sign in again and if needed grant the client application access to the requested scope.
at net.raphimc.minecraftauth.responsehandler.MsaResponseHandler.handleJsonError(MsaResponseHandler.java:31)
at net.raphimc.minecraftauth.responsehandler.JsonHttpResponseHandler.handle(JsonHttpResponseHandler.java:45)
at net.raphimc.minecraftauth.responsehandler.JsonHttpResponseHandler.handle(JsonHttpResponseHandler.java:30)
at net.lenni0451.commons.httpclient.HttpClient.execute(HttpClient.java:213)
at net.raphimc.minecraftauth.step.msa.StepMsaDeviceCodeMsaCode.applyStep(StepMsaDeviceCodeMsaCode.java:58)
at net.raphimc.minecraftauth.step.msa.StepMsaDeviceCodeMsaCode.applyStep(StepMsaDeviceCodeMsaCode.java:34)
at net.raphimc.minecraftauth.step.AbstractStep.getFromInput(AbstractStep.java:44)
at net.raphimc.minecraftauth.step.AbstractStep.getFromInput(AbstractStep.java:44)
at net.raphimc.minecraftauth.step.BiMergeStep.getFromInput(BiMergeStep.java:52)
at net.raphimc.minecraftauth.step.BiMergeStep.getFromInput(BiMergeStep.java:22)
at net.raphimc.minecraftauth.step.AbstractStep.getFromInput(AbstractStep.java:44)
at net.raphimc.minecraftauth.step.AbstractStep.getFromInput(AbstractStep.java:44)
at net.raphimc.minecraftauth.step.SameInputTriMergeStep.getFromInput(SameInputTriMergeStep.java:63)
at net.raphimc.minecraftauth.step.SameInputTriMergeStep.getFromInput(SameInputTriMergeStep.java:26)
at be.bloodyshine.cheat.Main.main(Main.java:22)

Same problem in other projects using this library. Maybe something has changed in the login process? I tried re-logging into my account, it didn't change the situation.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions