Skip to content

ThisNils/node-epicgames-client-deviceauth-adapter

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

23 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

epicgames-client deviceauth adapter

npm version npm downloads license

Installation

npm i epicgames-client-deviceauth-adapter --save

Example

const { Launcher } = require('epicgames-client');
const ClientDeviceAuthAdapter = require('epicgames-client-deviceauth-adapter');

(async () => {

  const launcher = new Launcher();

  if(!await launcher.init()) {
    throw new Error('Error while initialize process.');
  }
  
  await launcher.login(null, await ClientDeviceAuthAdapter('EXCHANGE_CODE'));
  
  const playerName = 'Kysune';
  const account = await launcher.getProfile(playerName);
  if(!account) throw new Error(`Player ${playerName} not found!`);
	
  console.log(`${account.name}'s id: ${account.id}`);
  // "Kysune's id: 9a1d43b1d826420e9fa393a79b74b2ff"

})();

Exchange Code

As you cant obtain exchange codes in the browser anymore you need to use my tool or your own way! An exchange code is a onetime code that expires after 300 seconds. You will only have to get it once. If you want to login with a new account, delete the deviceAuth file (by default at .egstore/deviceAuth.json) and get a new exchange code for the account you want to add.

Do you need help?

Join our discord server: https://discord.gg/eZsTAr2sdw

License

MIT License

Copyright (c) 2020 Nils S.

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

About

Tool for epicgames-client and epicgames-fortnite-client to create, use and store device auths.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published