Skip to content

Commit

Permalink
Merge pull request #13 from TaloDev/develop
Browse files Browse the repository at this point in the history
Release 0.4.0
  • Loading branch information
tudddorrr authored Aug 1, 2024
2 parents c35f092 + dd616b9 commit ea2ddf5
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 2 deletions.
13 changes: 13 additions & 0 deletions addons/talo/apis/player_auth_api.gd
Original file line number Diff line number Diff line change
Expand Up @@ -111,3 +111,16 @@ func reset_password(code: String, password: String) -> Error:
return OK
_:
return _handle_error(res)

func toggle_verification(current_password: String, verification_enabled: bool, email: String = "") -> Error:
var res = await client.make_request(HTTPClient.METHOD_PATCH, "/toggle_verification", {
currentPassword = current_password,
verificationEnabled = verification_enabled,
email = email
})

match (res.status):
204:
return OK
_:
return _handle_error(res)
2 changes: 1 addition & 1 deletion addons/talo/plugin.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,5 @@
name="Talo Game Services"
description="Talo (https://trytalo.com) is an open-source game backend with services designed to help you build games faster. You can currently:\n\n- Identify and authenticate players\n- Store persistent data across players\n- Track events (levelling up, finding loot, etc)\n- Display high scores with leaderboards\n- Store and load player saves\n- Load game config options and flags from the cloud\n- Get feedback directly from your players"
author="trytalo"
version="0.3.1"
version="0.4.0"
script="talo_autoload.gd"
4 changes: 3 additions & 1 deletion addons/talo/samples/authentication/scripts/verify.gd
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,9 @@ func _on_submit_pressed() -> void:
var res = await Talo.player_auth.verify(code.text)
if res != OK:
match Talo.player_auth.last_error.get_code():
TaloAuthError.ErrorCode.INVALID_CREDENTIALS:
TaloAuthError.ErrorCode.VERIFICATION_CODE_INVALID:
validation_label.text = "Verification code is incorrect"
TaloAuthError.ErrorCode.VERIFICATION_ALIAS_NOT_FOUND:
validation_label.text = "Verification session is invalid"
_:
validation_label.text = Talo.player_auth.last_error.get_string()

0 comments on commit ea2ddf5

Please sign in to comment.