Giter Site home page Giter Site logo

mc-msa-auth's Introduction

mc-msa-auth

This is a way to authenticate with microsoft to get a minecraft token. This can be used for make custom clients, both headless or full clients. This project is made in rust, and is made for rust.

Example

This is an example of how you can get a minecraft token from the login method.

use mc-msa-auth::MicrosoftAuth;

fn main(){
    let mut auth = MicrosoftAuth::new("CLIENT ID", "CLIENT SECRET", "http://localhost:{PORT}/token");
    println!("URL: {}", auth.create_url())
    let code = auth.listen_for_code(8080).unwrap();
    let token = auth.get_token(code);
    println!("Code: {}", token);
}

Azure token

To get the the client id and the client secret value you can follow this step by step list.

  • Goto Azure Active Directory Overview
  • Log in with your microsoft account
  • Look in top and add a new registration
  • Fill in name
  • For Redirect URI choose web, and put in http://localhost:{PORT}/token where {PORT} is the port you want to use.
  • Then you have the client id it is called Application (client) ID
  • For the client secret you have to click on the create client secret
  • When you get into that page you just click on the new client secretbutton and click add in the bottom
  • Then your client secret is what is under the value name
  • Copy that to a safe place, because you only see it once
  • Now you have your client id and client secret

Credits

This project was made by notseanray with some help from AFunkyMonk. Also credits to the project Minecraft-auth by dommilosz. It is a similar project written in typescript, that was rewritten in rust for this project.

mc-msa-auth's People

Contributors

afunkymonk avatar notseanray avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.