This PR changes the error handling of the auth files.
Adds a new signal for 'signup_failed'
signal signup_failed(code, message)
Adds new ENUM for Auth_Type
enum Auth_Type { NONE = -1 LOGIN_EP, LOGIN_ANON, LOGIN_CT, LOGIN_OAUTH, SIGNUP_EP }
Adds new var for auth_request_type that uses ENUM
var auth_request_type : int = -1
All login and signup functions have a new line to delcare the 'auth_request_type'. This is then used in the error to send the correct type of signal to the user.
if requesting == Requests.EXCHANGE_TOKEN:
emit_signal("token_exchanged", false)
emit_signal("login_failed", res.error, res.error_description)
emit_signal("auth_request", res.error, res.error_description)
else:
var sig = "signup_failed" if auth_request_type == Auth_Type.SIGNUP_EP else "login_failed"
emit_signal(sig, res.error.code, res.error.message)
emit_signal("auth_request", res.error.code, res.error.message)
requesting = Requests.NONE
auth_request_type = Auth_Type.NONE
This PR changes the error handling of the auth files.
signal signup_failed(code, message)
enum Auth_Type { NONE = -1 LOGIN_EP, LOGIN_ANON, LOGIN_CT, LOGIN_OAUTH, SIGNUP_EP }
var auth_request_type : int = -1
All login and signup functions have a new line to delcare the 'auth_request_type'. This is then used in the error to send the correct type of signal to the user.
This will close #219