EML Docs

CrackAuth

CrackAuth generates an offline account from a username alone, without any server-side validation. It is synchronous and requires no network access.

Caution

Offline accounts are not legally valid for players who own a genuine Minecraft licence. Using crack authentication in a public launcher violates Minecraft’s Terms of Service. Use CrackAuth for local development and testing only. Use MicrosoftAuth in production.

import { CrackAuth } from 'eml-lib'

const account = new CrackAuth().auth('TestPlayer')
// store account and proceed to the home view

auth() method

Creates an offline Account from a username.

ParameterTypeDescriptionRequired?
usernamestringThe player username. Must be between 3 and 16 characters.Yes

Returns: Account

Throws: AUTH_ERROR — If the username is invalid (too short, too long, or contains illegal characters).