Coder Social home page Coder Social logo

Comments (10)

mdxs avatar mdxs commented on July 25, 2024

Is there any blog/twitter/news announcement from Facebook on this?

from gae-init.

lipis avatar lipis commented on July 25, 2024

Didn't hear anything.. just noticed it.. :)

from gae-init.

lipis avatar lipis commented on July 25, 2024

So there is no username in v2.0: http://stackoverflow.com/a/23527664/8418

The probably we'll have to create the username based on the slugified name or something like that..

from gae-init.

lipis avatar lipis commented on July 25, 2024

@gmist Maybe because of this new change, we'll have to use their name as a fallback for their username instead of the Numerical ID. But since the names could be unicodes we'll have to use the same approach with the unidecode as in gae-init-auth.. What do you think?

from gae-init.

gmist avatar gmist commented on July 25, 2024

Yes, it seems we need to use unidecode

unidecode.unidecode(response['name'])

from gae-init.

lipis avatar lipis commented on July 25, 2024

In the user creation for the username should probably slugify before doing whatever..

username = util.slugify(username).replace('-', '.')

from gae-init.

gmist avatar gmist commented on July 25, 2024

I think that slugify is not needed

def create_user_db(auth_id, name, username, email='', **params):
  username = re.sub(r'-+|_+|-+|\s+', '.', username.split('@')[0].lower().strip())

from gae-init.

lipis avatar lipis commented on July 25, 2024

and maybe:

def create_user_db(auth_id, name, username, email='', **params):
  username = unidecode.unidecode(username.split('@')[0].lower().strip())
  username = re.sub(r'-+|_+|-+|\s+', '.', username)

from gae-init.

gmist avatar gmist commented on July 25, 2024

+1

from gae-init.

gmist avatar gmist commented on July 25, 2024
  username = unidecode.unidecode(username.split('@')[0].lower()).strip()
  username = re.sub(r'[\W_]+', '.', username)

please check it on gae-de-init.appspot.com

from gae-init.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.