API Reference#

RemoteAuth#

class discord_remote_auth.RemoteAuth#

The RemoteAuth object, handles connecting to the remote auth gateway

await auth() Optional[str]#

Run the full authentication process and return the access token

Returns:

The access token if successful, None otherwise

Return type:

Optional[str]

@hello(self, coroutine)#

Register an coroutine for the hello event handler

Annotation:

@nonce_proof(self, coroutine)#

Register an coroutine for the nonce_proof event handler

Annotation:

@pending_remote_init(self, coroutine)#

Register an coroutine for the hello event handler

Annotation:

@pending_finish(self, coroutine)#

Register an coroutine for the pending_finish event handler

Annotation:

@finish(self, coroutine)#

Register an coroutine for the finish event handler

Annotation:

@cancel(self, coroutine)#

Register an coroutine for the cancel event handler

Annotation:

Types#

class discord_remote_auth.types.Hello#
op: Literal['hello']#
timeout_ms: int#
heartbeat_interval: int#
class discord_remote_auth.types.Init#
op: Literal['init']#
encoded_public_key: str#
class discord_remote_auth.types.ServerNonceProof#
op: Literal['nonce_proof']#
encrypted_nonce: str#
class discord_remote_auth.types.ClientNonceProof#
op: Literal['nonce_proof']#
proof: str#
class discord_remote_auth.types.PendingRemoteInit#
op: Literal['pending_remote_init']#
fingerprint: str#
class discord_remote_auth.types.PendingFinish#
op: Literal['pending_finish']#
encrypted_user_payload: str#
class discord_remote_auth.types.Finish#
op: Literal['finish']#
encrypted_token: str#
class discord_remote_auth.types.Cancel#
op: Literal['cancel']#
class discord_remote_auth.types.UserPayload(snowflake: int, discriminator: int, avatar_hash: Optional[str], username: str)#

An object representing the user currently trying to authenticate.

snowflake: int#

The snowflake id

discriminator: int#

The discriminator

avatar_hash: Optional[str]#

The avatar hash, if available

username: str#

The username