diff --git a/dropbox/openid.py b/dropbox/openid.py index f600979..47723ed 100644 --- a/dropbox/openid.py +++ b/dropbox/openid.py @@ -128,18 +128,24 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): class UserInfoResult(bb.Struct): """ :ivar UserInfoResult.family_name: - Last name of user. + Last name of the user. :ivar UserInfoResult.given_name: - First name of user. + First name of the user. :ivar UserInfoResult.email: - Email address of user. + The user's email address. Be aware it's possible that the user has since + lost access to their email. Note: email is not a unique or stable + identifier for a Dropbox account. Users can change their email, and + emails can be reused by different accounts. Apps should not use email as + a key for account identification; use ``sub`` instead. :ivar UserInfoResult.email_verified: - If user is email verified. + If the user's email address is verified. :ivar UserInfoResult.iss: - Issuer of token (in this case Dropbox). + Issuer of the token (in this case Dropbox). :ivar UserInfoResult.sub: An identifier for the user. This is the Dropbox account_id, a string - value such as dbid:AAH4f99T0taONIb-OurWxbNQ6ywGRopQngc. + value such as dbid:AAH4f99T0taONIb-OurWxbNQ6ywGRopQngc. The account_id + is a unique and stable identifier for a Dropbox account, suitable for + use as a key in authentication and account management. """ __slots__ = [ diff --git a/dropbox/users.py b/dropbox/users.py index 7390278..b29d8b6 100644 --- a/dropbox/users.py +++ b/dropbox/users.py @@ -23,13 +23,16 @@ class Account(bb.Struct): queried and the user making the query. :ivar Account.account_id: - The user's unique Dropbox ID. + The user's unique and stable Dropbox ID. :ivar Account.name: Details of a user's name. :ivar Account.email: The user's email address. Do not rely on this without checking the ``email_verified`` field. Even then, it's possible that the user has - since lost access to their email. + since lost access to their email. Note: email is not a unique or stable + identifier for a Dropbox account. Users can change their email, and + emails can be reused by different accounts. Apps should not use email as + a key for account identification; use ``account_id`` instead. :ivar Account.email_verified: Whether the user has verified their email address. :ivar Account.profile_photo_url: diff --git a/spec b/spec index 22a3058..404afad 160000 --- a/spec +++ b/spec @@ -1 +1 @@ -Subproject commit 22a3058f8c5594956fcded8d120700475c2ec9d7 +Subproject commit 404afad5c508a45ea9004c9d8c0cd4a56f0fbf22