Skip to content

Latest commit

 

History

History
39 lines (31 loc) · 816 Bytes

README.md

File metadata and controls

39 lines (31 loc) · 816 Bytes

BeAuth

Module for authenticating to Microsoft to interact with thier Minecraft Bedrock Realm API.

Usage Example

Typescript

import { authenticate } from '@mcbeutils/beauth'

authenticate(
  '[email protected]',
  'your-secret-password',
  (auth, error) => {
    if (error) return console.log('Failed to authorized! ' + error)

    const hash = auth.getHash()
    const xsts = auth.getXsts()

    console.log('Successfully authorized!')
  }
)

JavaScript

const { authenticate } = require('@mcbeutils/beauth')

authenticate(
  '[email protected]',
  'your-secret-password',
  (auth, error) => {
    if (error) return console.log('Failed to authorized! ' + error)

    const hash = auth.getHash()
    const xsts = auth.getXsts()

    console.log('Successfully authorized!')
  }
)