CatBoat-Launcher/modules/authenticate.js
azures04 3a81447b9c first commit
-  Discord RPC 🕹
  -  File protection 🔏
  -  Authentication 🔑
2025-04-26 08:09:46 +02:00

17 lines
459 B
JavaScript

const msmc = require("msmc")
const { Authenticator } = require("minecraft-launcher-core")
async function getMicrosoftAuth() {
const authManager = new msmc.Auth("select_account")
const xboxManager = await authManager.launch("raw")
const token = await xboxManager.getMinecraft()
return token.mclc()
}
function getMojangAuth(username, password) {
return Authenticator.getAuth(username, password)
}
module.exports = {
getMicrosoftAuth
}