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

Tweaks for using with Spotify OAuth #228

Open
FBosito opened this issue Jan 26, 2023 · 2 comments
Open

Tweaks for using with Spotify OAuth #228

FBosito opened this issue Jan 26, 2023 · 2 comments
Labels
enhancement New feature or request

Comments

@FBosito
Copy link

FBosito commented Jan 26, 2023

Description

Capacitor version:

Run npx cap doctor:

Latest Dependencies:

@capacitor/cli: 4.6.2
@capacitor/core: 4.6.2
@capacitor/android: 4.6.2
@capacitor/ios: 4.6.2

Installed Dependencies:

@capacitor/cli: 4.6.2
@capacitor/core: 4.6.2
@capacitor/android: 4.6.2
@capacitor/ios: 4.6.2

Library version:

  • 3.0.1

OAuth Provider:

  • Other: Spotify

Information

Thank you for your great work.

I tried using your tool to authenticate with Spotify.
But that wasn't possible out of the box, so I had to make the following adjustments:

cache-control header

If the cache-control header is sent with the token queries, the server returns a CORS error.
Solution => a disableCacheControlHeader flag in OAuth2AuthenticateBaseOptions

Authorization required for token queries

Spotify would like to have an authorization for the queries for the access_token and refresh_token in the header (https://developer.spotify.com/documentation/general/guides/authorization/code-flow/)

Authorization: Basic base64encodedKey
The key consists of Spotify Client ID and Client Secret

solution =>
Quick and dirty: also send the additionalResourceHeaders with the token queries
clean: own property for additionalTokenRequestHeaders

@moberwasserlechner moberwasserlechner added the enhancement New feature or request label Dec 4, 2023
@zaosoula
Copy link

zaosoula commented May 1, 2024

+1

@zaosoula
Copy link

zaosoula commented May 1, 2024

The issue is still there one year later, can someone give it a look

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants