GithubHelp home page GithubHelp logo

blurfx / django-steamauth Goto Github PK

View Code? Open in Web Editor NEW
27.0 3.0 7.0 16 KB

steam user login helper on django framework

Home Page: https://pypi.python.org/pypi/django-steamauth/

Python 100.00%
django django-steamauth steam steam-api

django-steamauth's Introduction

django-steamauth

make steam openid authorization easily

Dependency

  • requests
  • Django >= 1.7

Install

Python >= 3

pip install django-steamauth

Python 2.x

pip install django-steamauth==1.1.1

Usage

You should set ABSOLUTE_URL in settings.py for redirection after login. default is localhost

# settings.py

ABSOLUTE_URL='127.0.0.1:8000'
# or
ABSOLUTE_URL='yourowndomain.com'

You can retrive user id with get_uid method when a login is successful.

# views.py
from django.shortcuts import redirect
from steamauth import auth, get_uid

# GET /login
def login(request):
    # if your service does not support ssl, set use_ssl parameters value to False
    # return auth('/callback', use_ssl=False)
    return auth('/callback')

# GET /process
def login_callback(request):
    steam_uid = get_uid(request.GET)
    if steam_uid is None:
        # login failed
        return redirect('/login_failed')
    else:
        # login success
        # do something with variable `steam_uid`
        return redirect('/')

Changelog

1.1.2

  • Dropping Python 2 Support
  • Remove deprecated interfaces: RedirectToSteamSignIn, GetSteamID64
  • Change the default value of ABSOLUTE_URL from localhost to localhost:8000
  • Fix an issue use_ssl parameter of auth didn't work (#6)
  • Set default value of use_ssl to True

django-steamauth's People

Contributors

blurfx 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  avatar  avatar

Watchers

 avatar  avatar  avatar

django-steamauth's Issues

https is always used

        protocol = "https" if use_ssl else "https"

protocol will always be set to https

STEAM_LOGIN_URL needs to use https

I have recently tried using this plugin for a project.
The GetSteamID64 validation post fails so it always goes to the Login_failed page.
After doing some logging I determined that the post wasn't getting to the correct location. So I updated the STEAM_LOGIN_URL to use https and updated the matched64ID to also have https.

I now get sent to the login success page.

pip install django-steamauth not installing properly.

Hey I just tried out this library but it does not appear to be installing properly for me.
I'm using python 3.9.0, after installing it in my enviroment (plus the entire machine just to test) all I receive in the site-packages folder relating to steamauth is this folder but it's only ther dist-info.

And when I try to use I just get that there is no module called steamauth
image

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.