Skip to content

Fix Instagram OAuth URL formatting and scope separator#1435

Merged
atymic merged 3 commits intoSocialiteProviders:masterfrom
Faisd405:fix/instagram-oauth
Mar 23, 2026
Merged

Fix Instagram OAuth URL formatting and scope separator#1435
atymic merged 3 commits intoSocialiteProviders:masterfrom
Faisd405:fix/instagram-oauth

Conversation

@Faisd405
Copy link
Contributor

@Faisd405 Faisd405 commented Mar 10, 2026

This pull request updates the Instagram OAuth provider to improve how authentication URLs are built and adjusts the scope separator for compatibility. The main changes focus on ensuring proper URL formatting and parameter encoding.

OAuth URL handling:

  • Changed the scopeSeparator from a space to a comma in the Provider class to match Instagram's expected format.
  • Added a new buildAuthUrlFromBase method to construct the authentication URL with correctly encoded query parameters using http_build_query and urldecode.
  • Updated the getAuthUrl method to use the new buildAuthUrlFromBase method for generating the Instagram authorization URL.

@Faisd405 Faisd405 changed the title fix: update scopeSeparator to use comma and enhance buildAuthUrlFromBase method fix: update Instagram scopeSeparator to use comma and enhance buildAuthUrlFromBase method Mar 10, 2026
@Faisd405 Faisd405 changed the title fix: update Instagram scopeSeparator to use comma and enhance buildAuthUrlFromBase method Fix Instagram OAuth URL formatting and scope separator Mar 10, 2026
@atymic
Copy link
Member

atymic commented Mar 11, 2026

This looks like an AI pr. Can you please link to the docs for these changes?

@Faisd405
Copy link
Contributor Author

  1. For URL formatting, it should exactly match one of the base URIs in the list of valid OAuth URIs.
  2. For Scope Operator, it can be a comma-separated list or a URL-encoded space-separated list. I just follow the example from the Facebook Developer Apps

https://developers.facebook.com/docs/instagram-platform/reference/oauth-authorize/
image

@atymic atymic added the release:minor Release a new minor version for changed providers label Mar 23, 2026
@atymic atymic merged commit 59364b6 into SocialiteProviders:master Mar 23, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

release:minor Release a new minor version for changed providers

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants