Coder Social home page Coder Social logo

djaodjin / djaodjin-signup Goto Github PK

View Code? Open in Web Editor NEW
19.0 19.0 8.0 1.98 MB

Django app for frictionless signup

License: BSD 2-Clause "Simplified" License

Makefile 0.84% Python 75.83% HTML 4.43% JavaScript 18.90%
authentication django frictionless mfa registration

djaodjin-signup's People

Contributors

dependabot[bot] avatar knivets avatar smirolo avatar stephanerob avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

djaodjin-signup's Issues

API for daily active users metrics

We will count as a daily active user one where start_of_day(yesterday) < User.last_login < end_of_day(yesterday). This will be used in dashboard widget:
Screen Shot 2019-05-13 at 12 59 20 PM

  • This API endpoint could also be used to show a graph of daily active users through time. So it could/should be modeled on the model of saas.api.metrics.RevenueMetricAPIView for both request parameters and result JSON schema.

  • The definition of start_of_day/end_of_day should take into account timezones to make sure metrics do not change based on where the browser making a request is located.

Cannot register with non-ASCII content in form

This issue was originally opened here in djaodjin-saas.

@marmida said:

Validation rules fire that prevent the entry of non-ASCII content into the registration form. See the attached image.
fc772602-e9a7-11e4-863b-8bd6a19122a5
This may be specific to the wrapping site, or may be part of the djaodjin-signup core. I'm not certain. It should be the case that the registration form instead allows non-ASCII input.

Add API endpoint to recover an account

A POST to /api/auth/recover/ with an email address should trigger a notification to the user so she can recover the account. Currently this functionality is only available through the /recover/ page URL.

login through JWT API

  • Add a second login form in the testsite such that login, instead of returning a session cookie, uses the JWT login API to return a JSON Web Token.
  • Add a second register form in the testsite for doing the same for register.
  • Upgrade the vuejs component to generate requests with the CSRF/Cookie or JWT authorization header.

Builtin registration view is broken

When trying to signup I get this ValueError: The given username must be set. The problem is that username field is always empty in the file signup/views/users.py on the line 266. And apparently the NameEmailForm is not expecting a username parameter, while the call on line 266 is trying to fetch the field from the form data.

support multi-tenants

In signup/settings.py, DISABLED_AUTHENTICATION, DISABLED_REGISTRATION are used to enable/disable authentication and registration globally. This needs to be changed to use the output of a function instead. The function will look like the following in saas/models.py:

def get_broker():
    """
    Returns the site-wide provider from a request.
    """
    from saas.compat import import_string
    LOGGER.debug("get_broker('%s')", settings.BROKER_CALLABLE)
    try:
        return import_string(settings.BROKER_CALLABLE)()
    except ImportError:
        pass
    return Organization.objects.get(slug=settings.BROKER_CALLABLE)

Optional double factor authentication

Rework the workflow after login to support double factor authentication.

  1. Introduce Contact.verification_token and Contact.verification_token_expires_at fields to hold the second (generated) factor.
  2. Based on the design for get_broker, retrieve a settings to enable double-factor authentication.
  3. Emit a signal that will implement sending the verification_token to the user (defaults to e-mail in testsuite).

uploadImage returns a permission denied

1/ Calling uploadImage in djaodjin-signup-vue.js results in a permission denied. This is due to an $.ajax call without authorization / csrf headers.

2/ uploadImage should use a dedicated API end-point name even if in some cases it will default to djaodjinSettings.urls.user.api_contact (Ex: djaodjinSettings.urls.api.upload_profile_picture).

3/ Reviewing the #user-profile-container widget, updateProfile is also not working in the presence of a profile picture because saveProfileWithPicture and saveProfile do not exist. In all cases, There should only be one PATCH request in updateProfile.

4/ Rename uploadImage to uploadProfilePicture to be more accurate.

upgrade to Django 4.0

waiting for django-recaptcha, social-auth-app-django and social-auth-core to support Django 4.0.

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.