"Godot Keyring" is a Godot addon to interact with the OS keyring.
The addon itself is a wrapper of keychain by @hrantzsch to allow cross-platform support.
#some_node.gd
func store_password(user: String, password: String) -> void:
if password.is_empty() or user.is_empty():
print("Trying to store non valid credentials.")
return
Keyring.set_password("my_cool_application", "credentials", user, password)
func login(user: String) -> void:
var password := Keyring.get_password("my_cool_application", "credentials", user)
if password.is_empty():
return
# Use password
...
Requirements
Run the scons command to build the addon:
$ scons
You can also specify to which platform compile:
$ scons platform=windows
"Godot Keyring" logo by @archaeopteryz
Licensed under the MIT license, see LICENSE
The code in "src/keychain" is licensed under the MIT license, see keychain/LICENSE