mirror of
https://github.com/jwilsson/spotify-web-api-php.git
synced 2026-04-27 07:55:49 +03:00
[GH-ISSUE #243] Refreshing page causes Invalid authorization code #173
Labels
No labels
bug
docs
enhancement
enhancement
enhancement
feedback wanted
good first issue
help wanted
help wanted
help wanted
invalid
pull-request
question
question
upstream
upstream
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/spotify-web-api-php#173
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @dgtyPedro on GitHub (Dec 30, 2021).
Original GitHub issue: https://github.com/jwilsson/spotify-web-api-php/issues/243
I use the auth example given here to do my homepage but everytimes I refresh the page the token code gets invalidated, this happens because on refresh the $_GET['code'] stays the same as previous.
I wonder if I can do something with the Refresh Token but I don't want to mess with the other page that uses this token (this one does not have the token in the URL).
I already tried to do something like this:
but it give me too many redirects, causing the page to crash.
@dgtyPedro commented on GitHub (Dec 30, 2021):
I fixed inserting a try catch method. The code ended like this:
@dgtyPedro commented on GitHub (Mar 10, 2022):
New fix.
This fix that I posted would cause too many redirects on some devices, because of this situations now I use: