Skip to content

carlinhus/django-steamauth

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

django-steamauth

make steam openid authorization easily

Some information you should know

  • Tested in Python 2.x
  • Django 1.7 or above

Install

pip install django-steamauth

Usage

You should set ABSOLUTE_URL at 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 SteamID64 when a login is successful

#views.py

from steamauth import RedirectToSteamSignIn, GetSteamID64

# /login
def Login(request):
  return RedirectToSteamSignIn('/process')

# /process
def LoginProcess(request):
    steamid = GetSteamID64(request.GET)
    if steamid == False:
        # login failed
        return redirect('/login_failed')
    else:
        # login success
        # do something with variable `steamid`
        return redirect('/')
    

About

Python 2.x version of steamauth

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 100.0%