Comments (2)
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.
@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)
- docs email send configuration HOT 1
- don't specify loginverify failed redirect external url HOT 3
- Wrong email entered msg and first login redirect
- E-Mail enumeration through the login form
- hashed email instead of plaintext
- can we bump packaging to be above v22 given that it's now v23? HOT 1
- why the missing domain in the signup link? HOT 1
- Refactoring suggestions
- Security HOT 6
- No module named 'packaging' HOT 4
- Move LoginVerify checks to UserPassesTestMixin's methods HOT 8
- Anonimize/not store IP addresses HOT 6
- Cookie not deleted with LoginVerify HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from django-magiclink.