Skip to main content

Authentication

danger

Remember to never save your secrets in source control or any insecure environment. Anybody who gets access to them could use them to steal your accounts.

Resource management​

To manage resources, Mantle requires a valid .ROBLOSECURITY cookie value to authenticate all its requests.

If there is a logged-in Roblox Studio installation, Mantle can automatically extract its .ROBLOSECURITY cookie and will authenticate requests as the user logged in to Roblox Studio.

Otherwise, you will have to provide the cookie via an environment variable called ROBLOSECURITY.

You can set your environment variable in various ways, like the following:

Bash
export ROBLOSECURITY = "<your cookie>"
PowerShell
$env:ROBLOSECURITY = "<your cookie>"

Note that these will be temporary and you will have to reset them whenever you start a new terminal instance.

To get your .ROBLOSECURITY cookie manually, you have a couple options:

Navigate to roblox.com in your browser and open the dev tools (right-click and select "Inspect"). Navigate to the "Application" tab, then look for "Cookies" under "Storage" in the left-hand sidebar. Under "Cookies", select "https://www.roblox.com" then select ".ROBLOSECURITY" from the list of cookies. Copy the value from the "Cookie Value" section. You can then set your environment variable using one of the above methods.

Remote State Management​

Mantle supports managing remote state files using AWS S3 storage which requires authentication. Under the hood, Mantle uses the rusoto library and therefore supports all methods of authentication which rusoto supports.

The simplest way to supply authentication for your remote state file is via the AWS_ACCESS_KEY_ID and AWS_SECRET_ACCESS_KEY environment variables.

You can set your environment variables in various ways, like the following:

Bash
export AWS_ACCESS_KEY_ID = "<your access key id>"
export AWS_SECRET_ACCESS_KEY = "<your secret access key>"
PowerShell
$env:AWS_ACCESS_KEY_ID = "<your access key id>"
$env:AWS_SECRET_ACCESS_KEY = "<your secret access key>"

Note that these will be temporary and you will have to reset them whenever you start a new terminal instance.

If you are new to using AWS, I recommend you read their guide on best practices for managing AWS access keys before getting started.

To learn how to get an access key ID and secret, you can read their guide on understanding and getting your AWS credentials (read the intro and "Programmatic access" sections).