Skip to content

Commit

Permalink
Login using the login code and join the correct space
Browse files Browse the repository at this point in the history
  • Loading branch information
RevoluPowered committed Aug 3, 2024
1 parent c18160b commit e77196e
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
8 changes: 5 additions & 3 deletions mirror-godot-app/scripts/net/auth.gd
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,11 @@ func create_account_if_missing() -> Promise:


func check_login_code(login_code: String) -> Promise:
return self.post_request(POST_CHECK_LOGIN_CODE, "/login-code/check-login-code", {
"loginCode": login_code
})
return self.post_request(
POST_CHECK_LOGIN_CODE,
"/login-code/check-login-code?loginCode=" + login_code,
{}
)


func _promise_fulfill_successful(request: Dictionary, promise: Promise) -> void:
Expand Down
2 changes: 2 additions & 0 deletions mirror-godot-app/ui/login/login_code_ui.gd
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@ func _on_sign_in_pressed() -> void:
assert(data.refreshToken)
assert(data.spaceId)
assert(data.loginCode)
print("login code data: ", data)
await LoginService.login_as_user_deeplink("", data.refreshToken, data.spaceId, get_tree() )

func _ready():
var login_code: bool = ProjectSettings.get_setting("feature_flags/force_enable_login_code", false)
Expand Down

0 comments on commit e77196e

Please sign in to comment.