趙偉丞
趙偉丞

Reputation: 51

How can I modify my authentication and authorization on google app engine?

I'm trying to make my own authentication and authorization on my website using python 2.7 and google app engine. I can't modify User's password! Did I miss something? Or can I use some function to modify the User's password? Here is my code:

This is for create User to login:

self.auth.store.user_model.create_user(str(account), password_raw=str(password))

And I want to set a session when user login my website:

self.auth.get_user_by_password(account, password)

When user logout, It will:

self.auth.unset_session()

What api or functions should I use to modify user's password?

Upvotes: 1

Views: 44

Answers (1)

Vincent
Vincent

Reputation: 1157

I'm assuming you are saving the initial password, and your question is how you can change it afterwards?

This is done by:

user.set_password(password)
user.put()

I used this tutorial to implement user auth on GAE: https://blog.abahgat.com/2013/01/07/user-authentication-with-webapp2-on-google-app-engine/

Upvotes: 1

Related Questions