Reputation: 1
I have overridden RegisterSerializer.custom_signup (REGISTER_SERIALIZER) to set certain parameters in the user's profile based on cookie values and it works fine when a user registers using email/password. However, what I realized was that it's not getting called when the user registers through social (Google, specifically).
I found SocialLoginSerializer.post_signup which sounds like it might be the right place to inject similar logic, but I am not sure how to tell dj_rest_auth to use the overridden class. There does not appear to be an equivalent to the REGISTER_SERIALIZER config variable that points to the new class.
I also considered moving this logic to User's post_save signal event, but unfortunately one can't access the request (or cookies) from there (without some middleware acrobatics).
I am using dj_rest_auth 4.0.1 and allauth 0.50.0
Thanks in advance for any pointers.
Upvotes: 0
Views: 96