Skip to content

๐Ÿ”‘ A godot gdextension to interact with the OS keyring

License

Notifications You must be signed in to change notification settings

shomykohai/godot-keyring

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

19 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

Godot Keyring
๐Ÿ”‘ Godot Keyring

"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.

๐Ÿ“™ Usage

#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
    ...

๐Ÿ› ๏ธ Building

Requirements

Run the scons command to build the addon:

$ scons

You can also specify to which platform compile:

$ scons platform=windows

โœจ Credits

"Godot Keyring" logo by @archaeopteryz

๐Ÿ’ผ License

Licensed under the MIT license, see LICENSE

The code in "src/keychain" is licensed under the MIT license, see keychain/LICENSE