Lua SDK
FiveM / RedM (prefer BFF for auth) · LibreAuth native client · Protocol v2 available (Enterprise)
Lua
FiveM / RedM (prefer BFF for auth)
Setup Guide
authority.lua + session_gate.lua on host/BFF · prefer server-side license · AssertLicensed before features
- Credentials: name + ownerid (10 characters)
- API URL:
https://libreauth.nutexe.dev/api/1.3/ - Source:
lua/libreauth.lua - Ed25519 key: from
init→ Response Signing - Test: Live API · Init docs
Install / Dependencies
Terminal
-- Prefer BFF for login
-- v2: libreauth_v2.lua + host crypto hooks
Code Example
Lua
local Gate = require 'session_gate'
Gate.Boot(19079)
Gate.OnInit(auth:init())
Gate.MarkLicensed()
Gate.AssertLicensed()
Protocol v2 (Enterprise)
INFO
Requires Enterprise plan. Endpoint
https://libreauth.nutexe.dev/api/v2/. Guide: API Protocol v2.Source: lua/libreauth_v2.lua
Lua · v2
local Gate = require 'session_gate'
Gate.Boot(19079)
Gate.OnInit(auth:init())
Gate.MarkLicensed()
Gate.AssertLicensed()
More Links
- ← All Client SDKs
- 1.x source: View libreauth.lua
- Protocol v2: View libreauth_v2.lua · docs
- Interactive API docs
- Response Signing