Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Authentication

Authenticated user connections are started with Connection::login.

Besides the normal username and password, you need to provide a store for the steam guard machine data and a confirmation handler.

Steam guard machine data store

After authentication, steam provides the client with some machine specific data to allow skipping (depending on various factors) the authentication step for the next login.

For steam-vent to make use of this data, the app needs to provide a way for storing this data by providing an implementation of the GuardDataStore trait.

steam-vent bundles two implementations of the trait:

If none of these methods of storage are suitable for the specific use case, the app can provide their own implementation for the trait. For example storing the data in the application database.

Confirmation handler

When logging into steam, a user needs to provide confirmation of the login trough a second factor. Usually either trough the mobile app or by providing a TOTP token.

An app can implement this confirmation by providing one or more implementations of the AuthConfirmationHandler trait.

steam-vent bundles the following implementations of the trait:

Multiple authentication providers can be combined by using AuthConfirmationHandler::or, where the first backend that successfully completes the confirmation will be used. A common use case for apps will be combining the DeviceConfirmationHandler and one of the TOTP providers to allow users to confirm the login trough either the app or TOTP.

Alternatively apps can provide their own implementation of the trait to integrate whichever method of asking the user for the TOTP token.