/bitwarden-plugin

An external plugin for RuneLite that interfaces with Bitwarden.

Primary LanguageJavaBSD 2-Clause "Simplified" LicenseBSD-2-Clause

Bitwarden

Plugin that interfaces with the Bitwarden CLI to retrieve RuneScape passwords.

This plugin requires:

  • You have the Bitwarden CLI installed
  • bw is accessible in your PATH
  • You are comfortable using a command line interface
  • Your accounts are each under a website entry of runescape.com

It's recommended you walk through the documentation for Bitwarden CLI, so you are aware of the features of the application and the differences between logout and lock.

As long as you leave the CLI window open with the session key visible, or a browser window with Bitwarden logged in, someone can still access your account on your PC.

No login information is saved between sessions.

Usage

There are two ways to use this plugin.

Active

With this method, you have to keep your session key on hand and enter it every time the plugin starts. This would keep your information more secure if multiple people use your computer. Combine this with the Clear Key on Login config option to have the most security.

  1. Login to your Bitwarden vault through the CLI with bw login --raw and copy the resulting session key. Make sure not to copy the newline following it.
  2. Load RuneLite with this plugin enabled or enable this plugin while on the login screen.
  3. Paste your session key into the popup asking for it and press Ok.
    • Pressing cancel will suppress the popup until your next client start or plugin toggle.
  4. Once you switch to the login page, your password should fill in when it matches your username.
    • It may take a few seconds for your information to load depending on your internet connection.
    • If an error occurs, you should receive a popup indicating that.

Passive

With this method, you can manage your vault by locking it after you close RuneLite and unlocking it before you open it. It's a mildly faster way to get into the game, but it can be less secure if you have multiple users on your computer.

  1. Login to your Bitwarden vault through the CLI with bw login --raw.
  2. Set the environment variable BW_SESSION to your key.
    • On Windows, you can use the command setx or create an environment variable through the system menus.
    • On OSX/Linux, add the variable to your .profile file.
  3. Restart RuneLite if it is open.
  4. Once you switch to the login page, your password should fill in when it matches your username.
    • It may take a few seconds for your information to load depending on your internet connection.
    • If an error occurs, you should receive a popup indicating that.
  5. If the session key from BW_SESSION seems to be invalid, you will be prompted for a new key.