Skip to content

Custom Auth failed when use littleskin.cn #136

@HowXu

Description

@HowXu

Operating System

Windows

Version of Prism Launcher

FreesmLauncher 1.4.4

Version of Qt

Same in FreesmLauncher Relese 1.4.4

Description of bug

I attempted to use littleskin.cn as the api address for Custom login, but the backend log output was 400 and an error was reported

Steps to reproduce

Use Custom Login
Input your account
input https://littleskin.cn/api/yggdrasil as the api
Login and check the launcher log

Suspected cause

I checked the CustomAuthStep.cpp and found the post body below

QString CustomAuthStep::requestTemplate()
{
    if (m_action == AuthFlow::Action::Login) {
        return R"XXX(
{
    "username": "%1",
    "password": "%2",
    "clientToken": "%3",
    "requestUser": false
}
)XXX";
    } else {
        return R"XXX(
{
    "accessToken": "%1",
    "clientToken": "%2",
    "requestUser": false
}
)XXX";
    }
}

Unfortunately, the above-mentioned access format is incorrect for the vast majority of skin sites using yggdrasil, see Yggdrasil server api,the correct format is as below:

return R"XXX(
{
    "username": "%1",
    "password": "%2",
    "clientToken": "%3",
    "requestUser": false,
    "agent":{
		"name":"Minecraft",
		"version":1
	}
}
)XXX";

however, I forked the repo and changed the format, sure it could login in successfully, the skin didn't load correctly.
I guess this is a bug for most skin sites include littleskin, which is the biggest one in China

This issue is unique

  • I have searched the issue tracker and did not find an issue describing my bug.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions