Coder Social home page Coder Social logo

Comments (10)

mdxs avatar mdxs commented on August 28, 2024

Is this due to the user_db.put_async() call inside signin_user_db(user_db) in auth.py?

from gae-init.

mdxs avatar mdxs commented on August 28, 2024

Just noticed that 6f5143f introduced the put_async() call; was this to record some kind of "last login" via modified or was it needed to catch some pending updates (that should be dealt with elsewhere)?

from gae-init.

lipis avatar lipis commented on August 28, 2024

Yes.. It was the easiest way of the last seen thing and no pending updates.

from gae-init.

mdxs avatar mdxs commented on August 28, 2024

Hmm, I don't like the user modified simply from having logged on... in my opinion that should go into some audit trail (if an app needs that detail), while the user.modified should be reserved for actual changes to the user account/profile in that user record. But I'll sort that out in my own stuff (first). From commenting out the put_async() locally, I didn't see any bad behaviour... but that could be a lack of proper testing on my side. Is there a particular case/procedure you're aware of that it covers?

from gae-init.

lipis avatar lipis commented on August 28, 2024

I have to admit that is not the most accurate one for last seen thingy but in a way it is.. (unless you have the remember flag on)

I didn't want to introduce new properties or anything like that so the easiest way to do that without even affecting the performance is to do it asynchronously.. so if you are about to remove it simple delete that line and also the @ndb.toplevel decorator... more on that in the docs.. https://developers.google.com/appengine/docs/python/ndb/async#intro

from gae-init.

mdxs avatar mdxs commented on August 28, 2024

Excellent, thanks for the feedback and clarification; I've no problem for gae-init keeping things simple to get people started quickly. Not having a "last seen" feature might make it even simpler :-)

But hey, it made me learn something; so thanks!

from gae-init.

lipis avatar lipis commented on August 28, 2024

The simplest thing would be not having the user sign in at all.. :D but
like you said you learned something and it's not very intruding.. and this
line made you actually act on it in your real life project which is the
whole point..! People should go ahead and change these kind of stuff to
match their needs..

from gae-init.

lipis avatar lipis commented on August 28, 2024

Soon you might find more hidden easter eggs in the project.. it's full of small little things :)

from gae-init.

mdxs avatar mdxs commented on August 28, 2024

!!1

from gae-init.

lipis avatar lipis commented on August 28, 2024

hehe... nice one.. stolen from Google :)
http://www.google.com/stolen

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.