Skip to content
This repository was archived by the owner on May 1, 2025. It is now read-only.

Commit e413161

Browse files
updated readme
1 parent f2a4386 commit e413161

File tree

1 file changed

+24
-34
lines changed

1 file changed

+24
-34
lines changed

README.md

Lines changed: 24 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -1,46 +1,36 @@
1-
# Minecraft OAuth server
1+
# Minecraft OAuth Server
22

3-
## Preface
3+
## 🚀 Description
4+
A simple way to add Minecraft authentication to your website or project.
45

5-
Implementation of the Minecraft authentication flow in Java. After developing the [mc-oauth plugin](https://github.com/Andcool-Systems/mc-oauth), I was very disappointed with the load on my VPS from the original Minecraft server, and even the PaperMC core did not significantly improve the situation. So, I decided to write a server from scratch that would only include the authentication system, without burdening the server with the game world.
6+
Many developers who have tried to implement user authentication through Minecraft's official system using Microsoft have encountered various difficulties. One of the main issues is the requirement to create and get approval for an authentication application directly from Microsoft, which can be a challenging task.
67

7-
All endpoints and response types remain the same as in the plugin.
8+
## 💡 Why mc-oauth?
9+
Our service provides an authentication system that does not require complex actions from either users or developers.
810

9-
>[!Note]
10-
> This server does not contain game state implementation and cannot be used for full-fledged gameplay.
11-
>
11+
### 🔑 Features
12+
- 📋 Retrieve nickname and UUID via REST API
13+
- 🛡️ Zero Trust (Impossible for users to spoof Minecraft account data)
14+
- ⚡ Easy to use and implement
15+
- 🔒 The server handles only the authentication flow and nothing more
1216

13-
## Retrieving Data
14-
`GET /code/<6-digit code>`
15-
After the user receives the code, you should send a request to the API endpoint, which will return data about the Minecraft account.
16-
The code is valid only once and for 5 minutes (by default) after it is received. After this time, the code is deleted.
17+
## 🛠️ For Developers
18+
1. Add a form on your website or project for entering a 6-digit code.
19+
2. After the user inputs the code provided by the server upon login, make a request to the API endpoint described below.
1720

18-
**Example of a Successful Response:**
21+
### 📡 API Endpoint
22+
```
23+
GET /code/<6-digit code>
24+
```
25+
26+
### Example of a successful server response:
1927
```json
2028
{
29+
"statusCode": 200,
2130
"nickname": "AndcoolSystems",
22-
"UUID": "1420c63c-b111-4453-993f-b3479ba1d4c6",
23-
"status": "success"
31+
"UUID": "1420c63cb1114453993fb3479ba1d4c6"
2432
}
2533
```
2634

27-
## Detailed description
28-
29-
The main stages of establishing a connection with the server:
30-
C–Client S–Server
31-
1. **C -> S** Handshake
32-
2. **C -> S** Login start
33-
3. **S -> C** Encryption request
34-
4. **Client auth**
35-
5. **C -> S** Encryption response
36-
6. **Server auth + generate code**
37-
7. **S -> C** Code response
38-
39-
The server does not have an offline mode setting, as it would not make sense in this case, so it always tries to authenticate the player through Mojang.
40-
41-
TODO:
42-
- [x] Add server icon support.
43-
- [ ] Add the ability to choose the authentication server.
44-
- [x] Add configuration.
45-
- [ ] Add a proper logger (instead of the custom SillyLogger).
46-
- [x] Add text formatter for MOTD.
35+
> [!NOTE]
36+
> The code can only be used once and is valid for up to 5 minutes after it is issued to the client. After that, it is automatically deleted.

0 commit comments

Comments
 (0)