[PR #37] [MERGED] Allow base authorizeUrl to contain query string #494

Closed
opened 2026-03-03 16:49:07 +03:00 by kerem · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/OAuthSwift/OAuthSwift/pull/37
Author: @danielhill
Created: 3/20/2015
Status: Merged
Merged: 3/21/2015
Merged by: @dongri

Base: masterHead: master


📝 Commits (2)

  • 9ba3bd4 If authorizeUrl contains a query string already, append an ampersand
  • 23e9502 Change FitBit authorizeUrl to pass in display=touch parameter, for

📊 Changes

3 files changed (+3 additions, -3 deletions)

View changed files

📝 OAuthSwift/OAuth1Swift.swift (+1 -1)
📝 OAuthSwift/OAuth2Swift.swift (+1 -1)
📝 OAuthSwiftDemo/ViewController.swift (+1 -1)

📄 Description

Currently, OAuth1Swift and OAuth2Swift append query string parameters to authorizeUrl with no regard as to whether a query string already exists, resulting in URL's like http://example.com/oauth/authorize?display=touch?oauth_token=12345

This pull request changes this functionality to check to see if a ? is already present in the URL. If so, it will append a & before further parameters, otherwise a ? is used.

I've also updated the FitBit demo to pass in the display=touch parameter, as making that work was the whole point of this modification.


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/OAuthSwift/OAuthSwift/pull/37 **Author:** [@danielhill](https://github.com/danielhill) **Created:** 3/20/2015 **Status:** ✅ Merged **Merged:** 3/21/2015 **Merged by:** [@dongri](https://github.com/dongri) **Base:** `master` ← **Head:** `master` --- ### 📝 Commits (2) - [`9ba3bd4`](https://github.com/OAuthSwift/OAuthSwift/commit/9ba3bd45d9540175b7ed8fe43fe863e0882a28f8) If authorizeUrl contains a query string already, append an ampersand - [`23e9502`](https://github.com/OAuthSwift/OAuthSwift/commit/23e9502d397e6eb1896df03aa3d1a9095098024b) Change FitBit authorizeUrl to pass in display=touch parameter, for ### 📊 Changes **3 files changed** (+3 additions, -3 deletions) <details> <summary>View changed files</summary> 📝 `OAuthSwift/OAuth1Swift.swift` (+1 -1) 📝 `OAuthSwift/OAuth2Swift.swift` (+1 -1) 📝 `OAuthSwiftDemo/ViewController.swift` (+1 -1) </details> ### 📄 Description Currently, _OAuth1Swift_ and _OAuth2Swift_ append query string parameters to _authorizeUrl_ with no regard as to whether a query string already exists, resulting in URL's like http://example.com/oauth/authorize?display=touch?oauth_token=12345 This pull request changes this functionality to check to see if a _?_ is already present in the URL. If so, it will append a _&_ before further parameters, otherwise a _?_ is used. I've also updated the FitBit demo to pass in the display=touch parameter, as making that work was the whole point of this modification. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
kerem 2026-03-03 16:49:07 +03:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/OAuthSwift#494
No description provided.