Coder Social home page Coder Social logo

imbolc / aiohttp-login Goto Github PK

View Code? Open in Web Editor NEW
51.0 51.0 18.0 60 KB

Registration and authorization (including social) for aiohttp apps.

License: ISC License

Python 71.57% HTML 28.43%
aiohttp authentication authorization oauth oauth2 registration

aiohttp-login's People

Contributors

arkadybag avatar imbolc avatar isevendays avatar vladz 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  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  avatar  avatar  avatar  avatar

aiohttp-login's Issues

requirements.txt does not specify versions

The requirements.txt should specify compatible versions. For example the current code is for motor 1 and not compatible with motor 2.

With the current setup motor 2 is installed but not working.

[Question] Unable to run tests and example

Hi.

Could you please provide some details about database setup for running tests?
I get errors about invalid user or password even if I run one empty test with only the client fixture.

I've tried to run pytest with local postgres and with docker.
Also tried to update places where DATABASE placeholder is used in utils.py with my connection details.

TypeError: render_template() missing 1 required positional argument: 'context'

I ran into the following error using aiohttp-login:

Error handling request
Traceback (most recent call last):
  File "/var/www/dnd/lib64/python3.6/site-packages/aiohttp/web_server.py", line 62, in handle_request
    resp = yield from self._handler(request)
  File "/var/www/dnd/lib64/python3.6/site-packages/aiohttp/web.py", line 270, in _handle
    resp = yield from handler(request)
  File "/var/www/dnd/lib64/python3.6/site-packages/aiohttp_jinja2/__init__.py", line 115, in middleware
    return (yield from handler(request))
  File "/var/www/dnd/lib64/python3.6/site-packages/aiohttp_session/__init__.py", line 129, in middleware
    response = yield from handler(request)
  File "/var/www/dnd/aiohttp-login/aiohttp_login/flash.py", line 31, in process
    response = await handler(request)
  File "/var/www/dnd/aiohttp-login/aiohttp_login/handlers.py", line 328, in confirmation
    return render_template(themed('confirmation_error.html'), request)
TypeError: render_template() missing 1 required positional argument: 'context'

How to validate a token in each request?

Hi, thank you for your great work.

When an user redirect to google login page and successfully logged in and back to the site, she/he want to access to some resource on the server.

She/he add the token in authorization header in each request and she/he expects to get related resource (based on her permission)

Question is : How to validate a token in each request(token decoding and validation - google client)?

Thanks

Possible vulnerability in @admin_required decorator

I am probably reading the code wrong, and project is probably already abandoned, but to me it looks like @admin_required decorator works in this fashion:

  1. Checks if user is logged in
  2. Executes the handler
  3. And only then checks if user is actually an admin. If he is not, an exception is raised.

As far as i can tell, that means that you can't rely on @admin_required to, say, protect administrative API endpoints, since handler will be executed anyway. Attacker will get his 403, sure, but changes to the system state will already been made at this point.

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.