Is it possible to override this class to allow adding other custom fields?
e.g. In my case is an administrator who register the user email. I already modified the send_email_with_callback_token function to include the token into a link but I also want to be able to add other custom codes to the link so that the user will be redirected appropriately based on the administrator wishes.
How do I override this class to add some more serialisers fields? Thanks.
class EmailAuthSerializer(AbstractBaseAliasAuthenticationSerializer):
@property
def alias_type(self):
return 'email'
email = serializers.EmailField()
you can inherit EmailAuthSerializer and make your serializer.
i also implement like this. then I override view and make my own url and it worked really fine
Is it possible to override this class to allow adding other custom fields? e.g. In my case is an administrator who register the user email. I already modified the
send_email_with_callback_token
function to include the token into a link but I also want to be able to add other custom codes to the link so that the user will be redirected appropriately based on the administrator wishes.How do I override this class to add some more serialisers fields? Thanks.