Code Monkey home page Code Monkey logo

litestar-users's People

Contributors

cofin avatar dialvarezs avatar lonelyvikingmichael avatar lovelesscodes 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

Watchers

 avatar  avatar  avatar  avatar

litestar-users's Issues

Enhancment: MFA support

Support for MFA would be another essential feature. Integration could be done with passlib as well, using its TOTP capabilities.

Enhancement: Add role management interface

Currently it's only possible to create roles manually or via seeding scripts. We should add role based methods to UserService at the very least and create new route handlers at most.

Edit: The same applies to adding/revoking roles to/from users

Enhancement: Static typing

Typing is not terrible, but can definitely improve. MyPy will surely fail

Route handler typing was not updated after JWT support was added, this should be addressed.

Enhancement: Make `roles` a seperate mixin

With the merge of #23 , role based authorization is no longer a given. We should remove the roles relationship from the User mixin and make it a seperate opt-in.

Not only will this be cleaner, it will also allow for something like this wherever roles are integrated:

if not hasattr(request.user, 'roles'):
    raise ImproperlyConfiguredException("user roles are not set up")

Enhancement: Make UserService configurable

Developers will need to subclass UserService in order to write their own pre/post operation hooks for login, register, update etc. This likely requires an update to config and typing.

Enhancement: Tests and test coverage

So far we're pretty much only testing the API endpoints, and even then not for all common scenarios.
There should be unit tests for the repositories, services, guards etc.

Bug: Any user can verify themselves during registration

The user will be verified if "is_verified": true is part of the JSON payload

A mechanism should be put in place to address this, with care when a user might be created programmatically outside of the REST API scope by an administrator who wishes to bypass verification case by case.

Enhancement: Add password reset

Add two new handlers forgot_password and reset_password - the former emits a token, the later verifies and consumes a token.

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.