microshaft 1.0.1
microshaft: ^1.0.1 copied to clipboard
Get logged in to a minecraft account quickly without all of the boilerplate of dancing with microsoft, xbox and mojang servers, maintaining a cache for expiring tokens and whatnot.
example/microshaft_example.dart
import 'package:microshaft/microshaft.dart';
import 'package:microshaft/src/model/shafted.dart';
void main() {
MicroshaftClient(storage: FileStorage.load("tokens.dat"))
.authenticate((url, code) {
print("Go to $url");
print("Enter: $code");
}).then((Shafted value) {
// THE MOJANG TOKEN
value.mojangToken;
// THE MINECRAFT USERNAME
value.profileName;
// THE REAL UUID
value.uuid;
});
}