All Projects → imbolc → aiohttp-login

imbolc / aiohttp-login

Licence: ISC license
Registration and authorization (including social) for aiohttp apps.

Programming Languages

python
139335 projects - #7 most used programming language
HTML
75241 projects

Projects that are alternatives of or similar to aiohttp-login

Hydra
OpenID Certified™ OpenID Connect and OAuth Provider written in Go - cloud native, security-first, open source API security for your infrastructure. SDKs for any language. Compatible with MITREid.
Stars: ✭ 11,884 (+22322.64%)
Mutual labels:  oauth, authorization
Oauthlib
A generic, spec-compliant, thorough implementation of the OAuth request-signing logic
Stars: ✭ 2,323 (+4283.02%)
Mutual labels:  oauth, authorization
Spark Pac4j
Security library for Sparkjava: OAuth, CAS, SAML, OpenID Connect, LDAP, JWT...
Stars: ✭ 154 (+190.57%)
Mutual labels:  oauth, authorization
Mern Boilerplate
Fullstack boilerplate with React, Redux, Express, Mongoose, Passport Local, JWT, Facebook and Google OAuth out of the box.
Stars: ✭ 112 (+111.32%)
Mutual labels:  oauth, authorization
undertow-pac4j
Security library for Undertow: OAuth, CAS, SAML, OpenID Connect, LDAP, JWT...
Stars: ✭ 35 (-33.96%)
Mutual labels:  oauth, authorization
Fosite
Extensible security first OAuth 2.0 and OpenID Connect SDK for Go.
Stars: ✭ 1,738 (+3179.25%)
Mutual labels:  oauth, authorization
Pac4j
Security engine for Java (authentication, authorization, multi frameworks): OAuth, CAS, SAML, OpenID Connect, LDAP, JWT...
Stars: ✭ 2,097 (+3856.6%)
Mutual labels:  oauth, authorization
Ueberauth
An Elixir Authentication System for Plug-based Web Applications
Stars: ✭ 1,259 (+2275.47%)
Mutual labels:  oauth, authorization
auth
🔑 Laravel Authentication package with built-in two-factor (Authy) and social authentication (Socialite).
Stars: ✭ 39 (-26.42%)
Mutual labels:  authorization, registration
Spring Security Pac4j
pac4j security library for Spring Security: OAuth, CAS, SAML, OpenID Connect, LDAP, JWT...
Stars: ✭ 231 (+335.85%)
Mutual labels:  oauth, authorization
Spring Webmvc Pac4j
Security library for Spring Web MVC: OAuth, CAS, SAML, OpenID Connect, LDAP, JWT...
Stars: ✭ 110 (+107.55%)
Mutual labels:  oauth, authorization
cb4
Joint Online Judge
Stars: ✭ 20 (-62.26%)
Mutual labels:  oauth, aiohttp
Sample Spring Oauth2 Microservices
some examples that show basic and more advanced implementations of oauth2 authorization mechanism in spring-cloud microservices environment
Stars: ✭ 109 (+105.66%)
Mutual labels:  oauth, authorization
nexus3-github-oauth-plugin
This nexus plugin provides a way to authenticate/authorize your users based on Github.
Stars: ✭ 52 (-1.89%)
Mutual labels:  oauth, authorization
Warden Github Rails
Use GitHub as authorization and more. Use organizations and teams as means of authorization by simply wrapping your rails routes in a block. Also useful to get a user's details through OAuth.
Stars: ✭ 100 (+88.68%)
Mutual labels:  oauth, authorization
Security.identity
.NET DevPack Identity is a set of common implementations to help you implementing Identity, Jwt, claims validation and another facilities
Stars: ✭ 165 (+211.32%)
Mutual labels:  oauth, authorization
Github Create Token
Create a Github OAuth access token.
Stars: ✭ 6 (-88.68%)
Mutual labels:  oauth, authorization
Stormpath Sdk Php
PHP SDK for the Stormpath User Management and Authentication REST+JSON API
Stars: ✭ 72 (+35.85%)
Mutual labels:  oauth, authorization
Awesome Iam
👤 Identity and Access Management Knowledge for Cloud Platforms
Stars: ✭ 186 (+250.94%)
Mutual labels:  oauth, authorization
ApiJwtWithTwoSts
Web API authorization, multi-IDP solutions in ASP.NET Core
Stars: ✭ 43 (-18.87%)
Mutual labels:  oauth, authorization

aiohttp-login

Registration and authorization (including social) for aiohttp apps

With just a few settings you'll give for your aiohttp site:

  • registration with email confirmation
  • authorization by email or social account (facebook, google and vkontakte for now)
  • reset password by email
  • change email with confirmation
  • edit current password

You can see all of this staff alive here

Databases

You can use this lib with different database backends:

  • postgres with asyncpg
  • mongodb with motor
  • the db you need - it's very easy to add a new backend

UI themes

The library designed to easily change UI themes. Currently bootstrap-3 and bootstrap-4 themes are available. But it's very easy to add new themes, actually theme - is just a folder with jinja2 templates.

Installation and configuration

Just install the library from pypi:

pip install aiohttp-login

Choice and configure one of database storages.

For postgres with asyncpg:

import asyncpg
from aiohttp_login.asyncpg_storage import AsyncpgStorage

pool = await asyncpg.create_pool(dsn='postgres:///your_db')
storage = AsyncpgStorage(pool)

For mongodb with motor:

from motor.motor_asyncio import AsyncIOMotorClient
from aiohttp_login.motor_storage import MotorStorage

db = AsyncIOMotorClient(io_loop=loop)['your_db']
storage = MotorStorage(db)

Now configure the library with a few settings:

app = web.Application(loop=loop)
app.middlewares.append(aiohttp_login.flash.middleware)
aiohttp_jinja2.setup(
    app,
    loader=jinja_app_loader.Loader(),
    context_processors=[aiohttp_login.flash.context_processor],
)
aiohttp_login.setup(app, storage, {
    'CSRF_SECRET': 'secret',

    'VKONTAKTE_ID': 'your-id',
    'VKONTAKTE_SECRET': 'your-secret',
    'GOOGLE_ID': 'your-id',
    'GOOGLE_SECRET': 'your-secret',
    'FACEBOOK_ID': 'your-id',
    'FACEBOOK_SECRET': 'your-secret',

    'SMTP_SENDER': 'Your Name <[email protected]>',
    'SMTP_HOST': 'smtp.gmail.com',
    'SMTP_PORT': 465,
    'SMTP_USERNAME': '[email protected]',
    'SMTP_PASSWORD': 'password'
})

That's all. Look at the live example and its code in the example folder. Full list of available settings you can find in aiohttp_login/cfg.py file.

Run the example

Create a virtual environment and install the dependencies:

cd example
python3 -m venv venv
source venv/bin/activate
pip install -r requirements.txt

Create postgres database and tables:

createdb aiohttp_login
psql -d aiohttp_login -f ../aiohttp_login/pg_tables.sql

Rename settings.py.template to settings.py and populate it with real data.

Run the server:

python app.py

Run tests

pip install -r requirements-dev.txt
py.test
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].