Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for 'show_dialog' parameter when creating authorization url #101

Merged
merged 2 commits into from
Aug 24, 2017

Conversation

ajhaupt7
Copy link
Contributor

I needed to use the "show_dialog" parameter in my personal application to force users to approve the app each time they attempt to log in. This param is not currently supported by the wrapper -- for the time being I can create the auth url manually, but it was an easy addition so I added support for it here.

var request = AuthenticationRequest.builder()
.withPath('/authorize')
.withQueryParameters({
'client_id' : this.getClientId(),
'response_type' : 'code',
'redirect_uri' : this.getRedirectURI(),
'scope' : scopes.join('%20'),
'state' : state
'state' : state,
'show_dialog' : showDialog
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It might be better to not pass it or initialise it to false. Otherwise devs that don't pass it will see show_dialog=undefined in the URL.

@thelinmichael
Copy link
Owner

@ajhaupt7, are you interested in making the necessary changes?

@ajhaupt7
Copy link
Contributor Author

ajhaupt7 commented May 5, 2017

@thelinmichael @JMPerez comments make sense, I'll go ahead and make the changes

@ajhaupt7
Copy link
Contributor Author

ajhaupt7 commented May 6, 2017

@thelinmichael @JMPerez made these changes and added a test for it -- its a bit verbose but does the trick

@JMPerez JMPerez merged commit f3d4ff3 into thelinmichael:master Aug 24, 2017
atoami pushed a commit to atoami/react-native-spotify-web-api that referenced this pull request Oct 20, 2018
…rl (thelinmichael#101)

* Add support for 'show_dialog' parameter when creating authorization url
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants