django-rest-auth

resetting password of user django rest auth

梦想与她 提交于 2020-04-17 22:50:27
问题 Good day, I am trying to override the password_reset_email of Django allauth. the issue is that it successfully overrides, but the data (password reset link, site name, and domain name) does not get passed to the email which eventually means that the user is not able to reset password because no link was sent. my password reset serializer class PasswordResetSerializer(PasswordResetSerializer): def get_email_options(self): return { 'subject_template_name': 'account/email/password_reset_key

overriding restauth password reset email issues

自闭症网瘾萝莉.ら 提交于 2020-04-16 08:19:19
问题 Good day, I am trying to override the password_reset_email of Django allauth. the issue is that it successfully overrides but I get the html code just sent to the user instead of the html representation. I was expecting a styled email just like I got for my confirmation email, but this does not seem to be the case. In my templates/registration/password_reset_email.html {% load i18n %} {% autoescape off %} <!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <meta name="viewport"

DRF auth_token: “non_field_errors”: [ “Unable to log in with provided credentials.”

僤鯓⒐⒋嵵緔 提交于 2020-03-20 06:04:06
问题 Both JWT packages written for Django gave me issues with poor documentation, so I try DRF-auth_token package. This is a good example I followed, Django Rest Framework Token Authentication. You should in theory be able to go to localhost:8000/api-token-auth/ urls.py: from django.conf.urls import url, include from django.contrib import admin from django.contrib.auth.models import User from rest_framework.authtoken import views urlpatterns = [ url(r'^admin/', admin.site.urls), url(r'^api/',

failed to configure axios with django rest auth to login and get auth token

蓝咒 提交于 2020-02-29 07:35:29
问题 I tried these codes: src/api/auth.js import session from "./session"; export default { login(Username, Password) { return session.post("/auth/login/", { Username, Password }); }, logout() { return session.post("/auth/logout/", {}); }, createAccount(username, password1, password2, email) { return session.post("/registration/", { username, password1, password2, email }); }, changeAccountPassword(password1, password2) { return session.post("/auth/password/change/", { password1, password2 }); },

failed to configure axios with django rest auth to login and get auth token

强颜欢笑 提交于 2020-02-29 07:35:01
问题 I tried these codes: src/api/auth.js import session from "./session"; export default { login(Username, Password) { return session.post("/auth/login/", { Username, Password }); }, logout() { return session.post("/auth/logout/", {}); }, createAccount(username, password1, password2, email) { return session.post("/registration/", { username, password1, password2, email }); }, changeAccountPassword(password1, password2) { return session.post("/auth/password/change/", { password1, password2 }); },