GithubHelp home page GithubHelp logo

Comments (2)

pyepye avatar pyepye commented on June 1, 2024 1

Hi @khashashin

This plugin was mainly built to work with templates rather than with a front-end making REST calls. Saying that it MIGHT be possible to get it work with some of the customisations available.

The first thing you would need to do is create your own login API view. This would need to take an email address and just call create_magiclink then magiclink.send() - Info here: https://github.com/pyepye/django-magiclink#creating-magiclinks

Then you would need to look at creating your own Custom login verify flow which you could use to set any Autorization headers or return a response body with a JWT token for example.

Finally I would also see if you can use the MAGICLINK_LOGIN_FAILED_REDIRECT setting incase a login fails (https://github.com/pyepye/django-magiclink#configuration-settings). I'm not sure if this setting would work with the front-end being on a different host though.

I hope that helps in some way.

Thanks
Matt

from django-magiclink.

khashashin avatar khashashin commented on June 1, 2024

@pyepye Thank you Matt. In meantime I found another tool that is actually designed to use with DRF is called djangopasswordless. But with a little effort I think it should be also possible to achieve it with django-magiclink

from django-magiclink.

Related Issues (14)

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.