Announcements

Help Wizard

Step 1

NEXT STEP

FAQs

Please see below the most popular frequently asked questions.

Loading article...

Loading faqs...

VIEW ALL

Ongoing Issues

Please see below the current ongoing issues which are under investigation.

Loading issue...

Loading ongoing issues...

VIEW ALL

Auth not working for web api on certain iPhones

Auth not working for web api on certain iPhones

I'm using the Spotify Web API to create a music player within a web app. I've got everything working fine on all devices, except for newer iPhones.

 

On the iPhone 10, iPhone 14 and iPhone 15, on all browsers, authentication isn't working. After logging into Spotify and granting permissions, the user is redirected back to the web app. However, they are not authenticated. The app behaves as if they are not authenticated and no access token is in local storage (where I was storing it).

 

There are no errors in the console.

 

Once again, this flow works perfectly fine on all devices I've tested it on, except for the iPhone 10, 14, and 15. Android is never a problem. I've confirmed it works on an iPhone 7 and an iPhone 12. The iOS version is the same on the iPhone 12, 14, and 15, yet auth only works on the 12.

 

Has anyone else ran into this issue?

Reply
2 Replies

Hey tanyarasoul, thanks for reaching out on the Community!

 

This is strange behavior. Do you log in with the same account on each phone?

If not, this behaviour could be explained by that your app is still in development mode. With this mode, you will need to add the name and email address of each account to the settings dashboard of your app for testing purposes. You can read more about it here.

 

Let me of this helps and if you have other questions.

XimzendSpotify Star
Help others find this answer and click "Accept as Solution".
If you appreciate my answer, maybe give me a Like.
Note: I'm not a Spotify employee.

It is also possible that privacy protection / memory management in your mobile web browser is clearing local storage or cookies, preventing your authentication flow from working properly (since it needs to read these when you are redirected back after authorization). Might be worth logging these values and making sure the flow is not broken.

Suggested posts