File tree 2 files changed +22
-5
lines changed
allauth/socialaccount/providers/pinterest
2 files changed +22
-5
lines changed Original file line number Diff line number Diff line change @@ -32,6 +32,10 @@ class PinterestOAuth2Adapter(OAuth2Adapter):
32
32
profile_url = "https://{0}/{1}/user_account" .format (
33
33
provider_base_url , provider_api_version
34
34
)
35
+ elif provider_api_version == "v3" :
36
+ profile_url = "https://{0}/{1}/users/me" .format (
37
+ provider_base_url , provider_api_version
38
+ )
35
39
else :
36
40
profile_url = "https://{0}/{1}/me" .format (
37
41
provider_base_url , provider_api_version
Original file line number Diff line number Diff line change @@ -1689,26 +1689,39 @@ Pinterest
1689
1689
1690
1690
The Pinterest OAuth2 documentation:
1691
1691
1692
+ # v1 # has been deprecated
1692
1693
https://developers.pinterest.com/docs/api/overview/#authentication
1693
1694
1695
+ # v3 # plan to enforce an end of life on June 30, 2023.
1696
+ https://developers.pinterest.com/docs/redoc/#section/User-Authorization
1697
+
1698
+ # v5
1699
+ https://developers.pinterest.com/docs/getting-started/authentication/
1700
+
1694
1701
You can optionally specify additional permissions to use. If no ``SCOPE ``
1695
- value is set, the Pinterest provider will use `` read_public `` by default.
1702
+ value is set, the Pinterest provider will use reading scope by default.
1696
1703
1697
1704
.. code-block :: python
1698
1705
1699
1706
SOCIALACCOUNT_PROVIDERS = {
1700
1707
' pinterest' : {
1701
- ' SCOPE' : [
1702
- ' read_public' ,
1703
- ' read_relationships' ,
1704
- ]
1708
+ ' SCOPE' : [' user_accounts:read' ],
1709
+ " PINTEREST_VERSION" : " v5" ,
1705
1710
}
1706
1711
}
1707
1712
1708
1713
SCOPE:
1709
1714
For a full list of scope options, see
1715
+
1716
+ # v1
1710
1717
https://developers.pinterest.com/docs/api/overview/#scopes
1711
1718
1719
+ # v3
1720
+ https://developers.pinterest.com/docs/redoc/#section/User-Authorization/OAuth-scopes
1721
+
1722
+ # v5
1723
+ https://developers.pinterest.com/docs/getting-started/scopes/
1724
+
1712
1725
Pocket
1713
1726
-------------
1714
1727
You can’t perform that action at this time.
0 commit comments