How can I determine a user_id based on an email address in App Engine?

前端 未结 2 1683
生来不讨喜
生来不讨喜 2020-12-05 03:41

The newest App Engine SDK (1.2.1) has an API call to compute an ID for a user account based on his email address. (The ID remains the same even if the user changes his addr

2条回答
  •  猫巷女王i
    2020-12-05 04:20

    The current workaround is to create a User object, store it to the datastore, and fetch it again. If the email corresponds to a valid Google account, the User object in the returned entity will have its user_id field populated.

提交回复
热议问题