scholrly / neo4django

Drop-in Neo4j/Django integration.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Neo4django authentication using email instead of username

tonjo opened this issue · comments

Lots of sites uses that one in these days...

Indeed they do. Many web apps also use various forms of social auth.

That said, all neo4django aims to do is replicate Django's existing auth functionality (https://docs.djangoproject.com/en/1.4/topics/auth/)- which is currently based on a username. Fortunately there are tons of tutorials out there on writing a custom auth backend; it could extend the one in neo4django.auth, or you could use another approach like setting the username to a user's email address.

If also you're interested in social auth, I have a neo4django / django-social-auth integration that I've yet to open source, but I'd be happy to share.

Yes, I understand why is like that, and I know it's a simple task.
I was thinking some sort of a ready-to-use extension to that behaviour.

Using email as username does not break this requirement?
"30 characters or fewer. Alphanumeric characters only (letters, digits and underscores)."

Hm, maybe that does break the req- my mistake. Regardless, there are a few solutions to this.

Re: a ready-to-use component - that could definitely be added via a 3rd party app, but I'd rather not include it in the library. Once Django 1.5 support is complete, though, this can be handled by a custom user model.