Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Request for email management endpoint #149

Open
kcajwilks opened this issue Sep 23, 2020 · 4 comments
Open

Request for email management endpoint #149

kcajwilks opened this issue Sep 23, 2020 · 4 comments

Comments

@kcajwilks
Copy link

kcajwilks commented Sep 23, 2020

Is there an API endpoint for email management as an extension of /accounts/email/ in the plans ? Functionality such as, adding new emails, setting primary email, re-send verification, and deleting email.

Cheers

@mohmyo
Copy link
Contributor

mohmyo commented Sep 27, 2020

It will be a great addition.

@ronek22
Copy link

ronek22 commented Nov 27, 2021

I started working on this feature.
Endpoints already implemented:

  • list all emails
  • add email
  • delete email
  • send verification
  • set email as primary

Still are some things todo:

  • make email endpoints pluggable, with some flag in settings.
    It's essential point, because in views I use forms from allauth, and basic version don't require allauth
  • make tests

Source code: https://github.com/ronek22/dj-rest-auth/tree/email-management

@Routhinator
Copy link
Contributor

@ronek22 Not sure if you're going to get back to getting this PR up - if not I may see it through.

One comment from pulling in what you have to my codebase - your CheckVerificationView is being a little too verbose to unauthenticated users - it should really just return 200 OK all the time instead of signalling hackers if an email is valid, etc.

@ronek22
Copy link

ronek22 commented Nov 2, 2022

@Routhinator

I won't have time for this in near future, so please go for it. Yes, I agree it’s too verbose in general, but someone could want to have it. Maybe you can add some flag, like in allauth ACCOUNT_PREVENT_ENUMERATION?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants