Giter Club home page Giter Club logo

steamcache-authcode's Introduction

Steam 2FA Auth Code Generator

Introduction

This wraps up the Steam 2FA Server code in a convenient Docker container for easy deployment. This can be used as a HTTP endpoing for recieving SteamGuard 2FA codes for use in scripts.

Usage

Pre-requisites

By default this is very insecure. You should not use this for a Steam Account you care about as anyone could use this webservice. If you are using this for running a Site License Server then you can just use a new Steam Account for it and there will be no risk.

You will need to obtain the JSON token from an authenticator. The easiest way to do this is to use the Steam Desktop Authenticator. When you complete the process, there is a maFiles directory. The .maFile in here is your JSON secret. Rename it to your username.json. Do not choose to encrypt your .maFile. It needs to be unencrypted for this to work.

The container requires a volume mounted for secrets. This should be mounted to /var/secrets inside the container and it should have your username JSON files in it. This should be kept as secure as possible.

Running the Container

To run the container, it's quite simple:

docker run \
    --restart=unless-stopped \
    --name steamcache-authcode \
    -p 80:80 \
    -d \
    -v /data/secrets:/var/secrets \
    lancachenet/steamcache-authcode:latest

In this example, the path /data/secrets on the host will be mapped to the secrets directory in the container.

Supported Environment Variables

The following variables are supported to allow configuration:

  • STEAM_FETCH_TIME - Defaults to true, whether to fetch the time from Valve for calculating the token
  • STEAM_IP_WHITELIST - A comma separated list of IPs to allow. If left blank, this will allow all IPs.

Getting a code

Just make a request to http://address/index.php/code/username to fetch the code for the user. For all other usage, please check the documentation.

License

The MIT License (MIT)

Copyright (c) 2017 Jessica Smith

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

steamcache-authcode's People

Contributors

mintopia avatar neomancer86 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

steamcache-authcode's Issues

No secret is available for that account.

Hi,
I setup the docker container in a qnap nas, mounted a host folder for the secret file and run the docker container.
If I switch to the console in the docker container I can see the secret file inside /var/secrets but if I call http:///index.php/code/<user_name> the following message is returned:

404 Not Found
No secret is available for that account.

Is there anything I can do to get it running, ord debug it?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.