Skip to content

Commit 75cc97f

Browse files
committed
chore: 1/2 of builders blog
1 parent 62cf6a7 commit 75cc97f

File tree

2 files changed

+32
-7
lines changed

2 files changed

+32
-7
lines changed

src/content/docs/blog/_annocing-auth-builder.mdx

Lines changed: 0 additions & 7 deletions
This file was deleted.
Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
---
2+
title: Introducing Builders!
3+
description: Introducing Builders for Authentification & Launching Minecraft!
4+
authors:
5+
- Eveeifyeve
6+
date: 2024-05-18
7+
---
8+
9+
# Welcome to the new Auth Builders and Launcher Builders!
10+
11+
We are excited to announce the release of the new Auth Builders and Launcher Builders.
12+
13+
These builders make it easier to create Authentication and Launching Minecraft required for your launcher.
14+
15+
Here is a quick example of the auth builder:
16+
17+
```Rust
18+
19+
use minecraft_auth::{AuthenticationBuilder, AuthType, CustomAuthData}
20+
21+
let mut auth = AuthenticationBuilder::builder();
22+
let client_secret = "keep this secret safe";
23+
24+
auth.of_type(AuthType::Oauth) // Change this to device code if you want to use that
25+
.client_id("6a6bf548-5a82-41f5-9451-88b334cdc77")
26+
.client_secret(&client_secret)
27+
.bedrockrel(Some(false));
28+
let auth_info = auth.get_info().await;
29+
println!("Authenifcation get_info {:?}", auth_info);
30+
31+
println!("Authentication info: {:?}", auth.launch().await?);
32+
```

0 commit comments

Comments
 (0)