Comments (8)
Ok So I have read documentation and understand that url
to activate email is not provided. So question I have now is how frontend should know about email address. Because the the link in email does not pass email
address to the view that user should implement.
I don't understand why we can't have GET endpoint to do activation? I would prefer this think our of the box, without me going and implementing addition views.
from django-rest-registration.
So question I have now is how frontend should know about email address. Because the the link in email does not pass email address to the view that user should implement.
We don't need to pass the email in case of user verification, because the email is already saved in the user model. We only need the user verification to switch the "is_active" flag (see 'USER_VERIFICATION_FLAG_FIELD'
key in REST_REGISTRATION
setting).
But we need to pass the email in the params in case when we want to change the email (with the register-email
view), because we want the email to be replaced in the user model only when the verification succeeds.
I don't understand why we can't have GET endpoint to do activation? I would prefer this think our of the box, without me going and implementing addition views.
This is because you usually implement single page app (SPA) in one technology (usually some JavaScript framework like React.js, Angular.js, Vue.js) so there is no sense for having frontend served by both your SPA and by Django views (you would need to share statics, template generation, etc). And implementing such logic is not so difficult (see example ). This argument does not apply so much in case of having only mobile app + backend setup, but I (and anyone else?) never used django-rest-registration
in that manner.
What could be somewhat useful for people who don't want to implement the verification views in their webapp, could be to add optional Django verification views, which would redirect to "success" / "failure" static pages, which the user would have to implement - even if we provided such ones in 99% the user would need to provide their own to have consistent layout, branding, etc. What do you think about this idea?
from django-rest-registration.
I totally I agree. I think t's would be totally useful, if there would be a separate installable django app that would provide all ancillary endpoints.
from django-rest-registration.
Btw, what about the issue, have you been able to replicate the issue?
from django-rest-registration.
Unfortunately I can't reproduce the bug. There are unit tests covering this case. I even tested how it behaves with the example application but it seems to work. I need more info about the way how you pass the parameters to the REST API endpoint:
- Do you pass something else than
user_id
,timestamp
,signature
? You mentioned that you tried to pass the email address. - Do you use some custom User model? I see that user_id is in UUID form, so my guess is yes. If yes, could you send some info how your User class looks like?
- How do you pass the data in the POST request to endpoint? Are you sending JSON payload with
Content-Type: application/json
or do you use some other method? How does the payload look like?
I may try to create test with custom User model where id will be UUID but I don't see how it would cause the problem, because all values are normalized to str
before signing / veryfying anyway.
from django-rest-registration.
@polinom Hi, did you make any progress on this issue? You didn't answer my questions so I'm not sure what is the status of the problem you encountered.
from django-rest-registration.
Closing this issue due to lack of activity.
from django-rest-registration.
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.
from django-rest-registration.
Related Issues (20)
- Custom mail templates source HOT 1
- Add ‘REGISTER_RETRIEVE_TOKEN’ HOT 3
- Error messages being stripped out of their codes. HOT 3
- To be able to return a custom response on successful password reset using data from request. HOT 2
- Support for Django 4.x HOT 2
- Please add ability to add user fields to successful login response HOT 4
- Setting to disable new user registration (the `/register` endpoint) HOT 4
- Page not found (404) HOT 6
- Why is there a check for a specific backend? HOT 6
- Remove check for LOGIN_FIELDS being unique HOT 1
- Dependency conflict in development requirements. HOT 2
- Fix type ignore issues
- Swagger generation through generateschema failing with VerifyRegistrationView HOT 2
- 'VerifyRegistrationView' should either include a `serializer_class` attribute, or override the `get_serializer_class()` method HOT 4
- user_activated not invoked HOT 2
- Cannot use a custom registration serializer that has a nested serializer HOT 5
- error while run `make install_dev`, Building wheel for backports-zoneinfo (pyproject.toml) did not run successfully. HOT 5
- Minor suggestion: correct typo in reset password view name HOT 1
- Customized registration process HOT 11
- Django signal user_logged_in is not always fired when login via login endpoint is performed successfully
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-rest-registration.