You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+21-5Lines changed: 21 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,7 +1,7 @@
1
1
# Minecraft OAuth Provider
2
2
3
3
## 🚀 Description
4
-
MC-oAuth-rs is an all-in-one solution that allows users to log in to a website using their Minecraft account without entering their username or password.
4
+
MC-OAuth-rs is an all-in-one solution that allows users to log in to a website using their Minecraft account without entering their username or password.
5
5
6
6
It’s secure, simple, and user-friendly, enabling logins only for users with a licensed Minecraft account.
7
7
The service supports Minecraft versions above 1.8.
@@ -67,26 +67,38 @@ For the server to work, create a `config.toml` file in the same directory as the
67
67
[api]
68
68
# API address
69
69
addr = "0.0.0.0"
70
+
70
71
# API port
71
72
port = 8008
73
+
72
74
# Life time of assigned code
73
75
code_life_time = 300
74
76
75
77
[server]
76
78
# Minecraft server address
77
79
addr = "0.0.0.0"
80
+
78
81
# Minecraft server port
79
82
port = 25565
83
+
80
84
# Server connection timeout
85
+
# Sets the maximum time a client can stay connected to the server. Used to prevent idle or junk connections.
81
86
timeout = 10
82
87
88
+
# [Optional] This setting defines the server IP to prevent proxy bypass or spoofing.
89
+
server_ip = "localhost"
90
+
83
91
[server.config]
84
92
# Minecraft server name
85
93
server_name = "mc-oauth-rs"
94
+
86
95
# Protocol version (`0` for auto)
96
+
# Used only during the server ping and is ignored when trying to connect. If set to 0, the protocol version that the client uses will be applied.
87
97
protocol = 0
98
+
88
99
# Minecraft version string
89
100
version = "1.21"
101
+
90
102
# Session Auth URL
91
103
# `{{NAME}}` in string will be replaced by the client nickname
92
104
# `{{HASH}}` will be replaced by the generated client hash
# `{{CODE}}` will be replaced by the generated code
110
126
success = "Hello, §6{{NAME}}§r! Your code is: §a{{CODE}}"
127
+
111
128
# Message for Mojang API error
112
129
bad_session = "§cFailed to login: Invalid session (Try restarting your game and the launcher)"
130
+
131
+
# Message for bad server address (`server_ip` setting)
132
+
using_proxy = "§cYou are using a proxy!"
113
133
```
114
134
115
-
> [!NOTE]
116
-
> The server icon should be in `.png` format and 64x64 pixels in size.
117
-
> `timeout` in the config sets the **maximum** time that the client can be connected before the server disconnects.
118
-
> `protocol` is used only during the server ping and is ignored when trying to connect. If set to `0`, the protocol version that the client uses will be applied.
119
135
120
136
### 🚀 Running
121
137
After configuring, run the compiled binary file through the console.
0 commit comments