Up to date

This page is up to date for Godot 4.3. If you still find outdated information, please open an issue.

LoginClient

Inherits: BlaziumClient < Node < Object

Node for connecting to the Blazium Login service. Offers authentication mechanism.

Description

The LoginClient node provides an interface for connecting to the Blazium Login service. There is a free instance hosted on the blazium.app domain that is used by default.

The authentication flow is as follows:

  1. Listen to all the signals you are interested in.

  2. Connect to the server using the connect_to_server method.

  3. Then you can request login info using the request_login_info method.

  4. Open the resulting login url received after awaiting on the LoginResponse.finished signal.

  5. Obtain the jwt from the received_jwt signal.

Note: Some methods are non blocking and can be awaited in order to get the result.

Properties

bool

connected

false

String

game_id

""

String

server_url

"wss://login.blazium.app/connect"

Methods

bool

connect_to_server()

void

disconnect_from_server()

LoginResponse

request_login_info(login_type: String)


Signals

connected_to_server() 🔗

Signal emitted when the client connects to the server.


disconnected_from_server(reason: String) 🔗

Signal emitted when the client disconnects from the server.


log_updated(command: String, logs: String) 🔗

Signals a log from a command.


received_jwt(jwt: String, type: String) 🔗

Signal emitted when a JWT is received.


Property Descriptions

bool connected = false 🔗

  • bool get_connected()

Client connected state.


String game_id = "" 🔗

Set what game id this client should use when connecting to the server. If this is missing connection will error.

Can only contain alphanumeric characters.


String server_url = "wss://login.blazium.app/connect" 🔗

  • void set_server_url(value: String)

  • String get_server_url()

Set to what url this client should connect to.


Method Descriptions

bool connect_to_server() 🔗

Connects to the server specified in server_url using the game id specified in game_id. Must be done before requesting login info.

Generates connected_to_server when connected.


void disconnect_from_server() 🔗

Disconnect from the server.

Generates disconnected_from_server when disconnected.


LoginResponse request_login_info(login_type: String) 🔗

Request login info using the login type specified.

Returns a LoginResponse object that has a LoginResponse.finished signal that is emitted when finished.