fediauth/readme.md

67 lines
1.9 KiB
Markdown
Raw Normal View History

2023-01-28 11:04:14 +00:00
# (T)OTP mod for minetest
2023-01-29 12:16:32 +00:00
* State: **Stable**
2023-01-28 11:04:14 +00:00
2023-01-29 12:16:32 +00:00
# Overview
Lets security-aware players use the `/otp_enable` command to protect their account with a second factor.
Players that have the OTP enabled have to enter a verification code upon joining the game.
2023-01-29 16:21:45 +00:00
# OTP Authenticator apps
2023-01-29 12:16:32 +00:00
* https://freeotp.github.io/
2023-01-29 16:21:45 +00:00
* https://github.com/helloworld1/FreeOTPPlus
2023-01-29 12:16:32 +00:00
# Screenshots
OTP verification form
![](./screenshot1.png)
OTP Setup form
![](./screenshot2.png)
2023-02-02 13:25:16 +00:00
# Temporary privilege revocation
All of the privileges get revoked when logging in with the otp enabled (until the proper code is entered).
Some exceptions:
* `fly` (otherwise the player would literally fall from the sky)
* `noclip`
To disable revokation on custom privs the field `otp_keep` can be set to true on the definition:
```lua
minetest.register_privilege("my_super_important_priv", {
description = "something something",
otp_keep = true
})
```
2023-02-02 13:34:50 +00:00
# Settings
* `otp.authenticator_image` The image to use in the QR code for the otp app (defaults to "https://raw.githubusercontent.com/minetest/minetest/master/misc/minetest-xorg-icon-128.png")
* `otp.issuer` The issuer name, defaults to server name, address or just "Minetest"
2023-01-29 12:16:32 +00:00
# Links / References
* https://en.wikipedia.org/wiki/Time-based_one-time_password
* https://en.wikipedia.org/wiki/HMAC-based_one-time_password
* https://en.wikipedia.org/wiki/HMAC
* https://github.com/google/google-authenticator/wiki/Key-Uri-Format
# Chatcommands
* `/otp_enable` Starts the OTP onboarding process
* `/otp_disable` Disables the OTP Login
# Privileges
* `otp_enabled` Players with this privilege have to verify the OTP Code upon login (automatically granted on successful `/otp_enable`)
2023-01-28 11:04:14 +00:00
# License
* Code: `MIT`
2023-01-29 12:16:32 +00:00
* Textures: `CC-BY-SA 3.0`
2023-01-28 16:49:12 +00:00
* "basexx.lua" `MIT` https://github.com/aiq/basexx/blob/master/lib/basexx.lua
2023-01-29 16:21:45 +00:00
* "qrencode.lua" `BSD` https://github.com/speedata/luaqrcode/blob/master/qrencode.lua