🚀 Big News: Socket Acquires Coana to Bring Reachability Analysis to Every Appsec Team.Learn more
Socket
Book a DemoInstallSign in
Socket

steam-openid

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

steam-openid

A simple package for integrating Steam OpenID authentication in applications.

1.0.6
PyPI
Maintainers
1

steam-openid

steam-openid provides a straightforward implementation for integrating Steam OpenID authentication into applications.

Requirements

  • Python 3.6 or higher
  • python3-openid

You can install the required dependencies with:

pip install -r requirements.txt

Example usage

from steam_openid import SteamOpenID

steam = SteamOpenID(
    realm="http://localhost:8080/steam/login",
    return_to="http://localhost:8080/steam/callback"
)


@app.route("/steam/login")
def login():
    redirect_url = steam.get_redirect_url()
    return redirect(redirect_url)


@app.route("/steam/callback")
def callback(request):
    steam_id = steam.validate_results(request.query_params)
    if steam_id:
        return 200, f"Your steam id is: {steam_id}"
    else:
        return 403, "Failed to authenticate"

Contributions

Pull requests are welcome! If you find a bug or have a feature request, please open an issue or submit a pull request.

License

This project is licensed under the MIT License.

FAQs

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts