https://github.com/authlib/loginpass
Login with Google, GitHub, Twitter, Facebook and many other networks.
https://github.com/authlib/loginpass
authlib login oauth1-client oauth2 oauth2-client
Last synced: 9 months ago
JSON representation
Login with Google, GitHub, Twitter, Facebook and many other networks.
- Host: GitHub
- URL: https://github.com/authlib/loginpass
- Owner: authlib
- License: bsd-3-clause
- Created: 2018-04-07T07:26:46.000Z (almost 8 years ago)
- Default Branch: master
- Last Pushed: 2022-05-16T09:59:54.000Z (over 3 years ago)
- Last Synced: 2024-05-01T10:36:07.624Z (over 1 year ago)
- Topics: authlib, login, oauth1-client, oauth2, oauth2-client
- Language: Python
- Homepage: https://authlib.org/
- Size: 197 KB
- Stars: 290
- Watchers: 7
- Forks: 67
- Open Issues: 23
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
Authlib Loginpass
=================
Social connections powered by [Authlib][]. This library is a part of Authlib project.
It works well with Authlib v0.14.3+.
[Authlib]: https://authlib.org/
```python
from flask import Flask
from authlib.integrations.flask_client import OAuth
from loginpass import create_flask_blueprint
from loginpass import Twitter, GitHub, Google
app = Flask(__name__)
oauth = OAuth(app)
def handle_authorize(remote, token, user_info):
if token:
save_token(remote.name, token)
if user_info:
save_user(user_info)
return user_page
raise some_error
backends = [Twitter, GitHub, Google]
bp = create_flask_blueprint(backends, oauth, handle_authorize)
app.register_blueprint(bp, url_prefix='')
```
Useful Links
------------
- Authlib Homepage:
- Authlib Repository:
Features
--------
Authlib Loginpass contains lots of connections (see below), every connection has a
`profile()` method which returns the same format of user info. It supports OAuth 1,
OAuth 2 and OpenID Connect for now.
The user info that `profile()` returns is standardized with [OpenID Connect UserInfo
claims](http://openid.net/specs/openid-connect-core-1_0.html#StandardClaims),
not something made by me.
Connections
-----------
Connections that Authlib Loginpass contains:
- [x] Battle.net
- [x] Google
- [x] GitHub
- [x] Gitlab
- [x] Twitter
- [x] Facebook
- [x] Dropbox
- [x] Reddit
- [x] Linkedin
- [x] Azure
- [x] Discord
- [x] Slack
- [ ] Jira
- [x] StackOverflow
- [x] Bitbucket
- [x] Auth0
- [x] Strava
- [x] Spotify
- [x] Yandex
- [x] Twitch
- [x] VK
- [x] [Ory Hydra](https://www.ory.sh/docs/hydra/)
Usage
-----
Loginpass is just a simple wrapper around [Authlib][], it is configured apps
ready to use with [Flask][] and [Django][]. Checkout the
examples for details.
[Flask]: https://docs.authlib.org/en/latest/client/flask.html
[Django]: https://docs.authlib.org/en/latest/client/django.html
Alternatives
------------
Most of the time, you don't have to use loginpass, you can just register
a remote app with Authlib's framework integrations. Checkout our demo on
OAuth clients for Flask, Django, Starlette and FastAPI:
License
-------
Loginpass is a group member of Authlib, it is licensed under BSD.
Authlib commercial license applies to this project too, you can get
a commercial license at [Authlib Commercial Plans](https://authlib.org/plans).