A Node.js client for doing requests to yggdrasil, the Mojang authentication system, used for Minecraft and Scrolls. There's already one other client out there (at the time of writing) but I don't like it, so I wrote this one.
node-yggdrasil was originally made because I was messing around with trying to make a Minecraft server in JS. Never really got anywhere with it. However, the folks over at PrismarineJS have gotten quite far with it, and use this library in their project.
$ npm install yggdrasil
//initconst ygg =//Optional settings objecthost: '' //Optional custom host. No trailing slash.;//Authenticate a userygg;//Refresh an accessTokenygg;//Validate an accessTokenygg;//Invalidate all accessTokensygg
const yggserver =;//Join a server (clientside)yggserver;//Join a server (serverside)yggserver;
const ProxyAgent = ;const ygg =//Any type of HTTP Agentagent: '';
With ES6 Named Exports
/*** Import Client or Server from 'yggdrasil/es6'.* Note that the library is stateless when imported this way vs the CommonJS way.*/// Use it like you normally would.yggyggServ;