[PR #435] [MERGED] Auto-refresh AuthCode flow token. #894

Closed
opened 2026-02-28 00:02:26 +03:00 by kerem · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/spotipy-dev/spotipy/pull/435
Author: @stefanondisponibile
Created: 2/3/2020
Status: Merged
Merged: 2/10/2020
Merged by: @stephanebruckert

Base: masterHead: master


📝 Commits (10+)

  • 1a2d3f7 Auto-refresh AuthCode flow token.
  • 0531af3 Reformatted.
  • 039863b Reformatted.
  • 1245c50 Removed invalid syntax.
  • c42ea02 Removed abstract class SpotifyAuthManager.
  • 3586b4c Fix typo on docstrings.
  • ad5dd25 Optionally try to fetch main input parameters from environment.
  • f810086 Removed f-string for Python2 compatibility.
  • 1f6dc17 Fix line-too-long.
  • b0b2841 Remove useless import.

📊 Changes

5 files changed (+723 additions, -445 deletions)

View changed files

📝 CHANGELOG.md (+7 -0)
examples/simple4.py (+12 -0)
📝 spotipy/client.py (+441 -296)
📝 spotipy/oauth2.py (+210 -83)
📝 spotipy/util.py (+53 -66)

📄 Description

I loved @stephanebruckert 's idea of having similar handlers for the two different authorization flows.

I think it would be even better having one one unique auth_manager inside the Spotify client, and infer it from the parameters. This also would allow a smooth and backward compatible pass to this.

What do you think?


🔄 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/spotipy-dev/spotipy/pull/435 **Author:** [@stefanondisponibile](https://github.com/stefanondisponibile) **Created:** 2/3/2020 **Status:** ✅ Merged **Merged:** 2/10/2020 **Merged by:** [@stephanebruckert](https://github.com/stephanebruckert) **Base:** `master` ← **Head:** `master` --- ### 📝 Commits (10+) - [`1a2d3f7`](https://github.com/spotipy-dev/spotipy/commit/1a2d3f79f0af46afeb1a987bd0153c20b0b654d1) Auto-refresh AuthCode flow token. - [`0531af3`](https://github.com/spotipy-dev/spotipy/commit/0531af3c846e26a9d869910caf147a9230e445c0) Reformatted. - [`039863b`](https://github.com/spotipy-dev/spotipy/commit/039863b7c55d2ba9b900800c2d8bbbf9055b9506) Reformatted. - [`1245c50`](https://github.com/spotipy-dev/spotipy/commit/1245c500a0a3edac50d8f16aea60cea54414ca93) Removed invalid syntax. - [`c42ea02`](https://github.com/spotipy-dev/spotipy/commit/c42ea023a27745480030d0966c7d03fd10b97b34) Removed abstract class SpotifyAuthManager. - [`3586b4c`](https://github.com/spotipy-dev/spotipy/commit/3586b4cbee4e7e658868d50651ed282a254b0dbf) Fix typo on docstrings. - [`ad5dd25`](https://github.com/spotipy-dev/spotipy/commit/ad5dd25d9e41df1a87bc86231fa8534dcd50e5ed) Optionally try to fetch main input parameters from environment. - [`f810086`](https://github.com/spotipy-dev/spotipy/commit/f810086cb13aabad44781e025a26a84a825cac8a) Removed f-string for Python2 compatibility. - [`1f6dc17`](https://github.com/spotipy-dev/spotipy/commit/1f6dc17287c394c92c935a095970ffc838599376) Fix line-too-long. - [`b0b2841`](https://github.com/spotipy-dev/spotipy/commit/b0b2841e6e177d6a4b5c911186969e3306006f04) Remove useless import. ### 📊 Changes **5 files changed** (+723 additions, -445 deletions) <details> <summary>View changed files</summary> 📝 `CHANGELOG.md` (+7 -0) ➕ `examples/simple4.py` (+12 -0) 📝 `spotipy/client.py` (+441 -296) 📝 `spotipy/oauth2.py` (+210 -83) 📝 `spotipy/util.py` (+53 -66) </details> ### 📄 Description I loved @stephanebruckert 's idea of [having similar handlers for the two different authorization flows](https://github.com/plamere/spotipy/issues/263#issuecomment-578539713). I think it would be even better having one one unique `auth_manager` inside the `Spotify` client, and infer it from the parameters. This also would allow a smooth and backward compatible pass to this. What do you think? --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
kerem 2026-02-28 00:02:26 +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/spotipy#894
No description provided.