Add show_dialog auth url option

Optional. Whether or not to force the user to approve the app again if they’ve already done so. If false (default), a user who has already approved the application may be automatically redirected to the URI specified by redirect_uri. If true, the user will not be automatically redirected and will have to approve the app again.

From https://developer.spotify.com/web-api/authorization-guide/
This commit is contained in:
Thomas Hooper committed 2017-08-02 10:36:10 +01:00
1 parent 7499d8e511
commit 6c3c384bf0
2 files changed
+21 -1

No files matched your search

+3 -1
View File
@@ -163,7 +163,7 @@ class SpotifyOAuth(object):
def is_token_expired(self, token_info):
return is_token_expired(token_info)
def get_authorize_url(self, state=None):
def get_authorize_url(self, state=None, show_dialog=False):
""" Gets the URL to use to authorize this app
"""
payload = {'client_id': self.client_id,
@@ -175,6 +175,8 @@ class SpotifyOAuth(object):
state = self.state
if state is not None:
payload['state'] = state
if show_dialog:
payload['show_dialog'] = True
urlparams = urllibparse.urlencode(payload)