You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm new to both Spotify development and React Native development, so please forgive me if I betray too much lack of understanding.
I'm building a custom Spotify player using React Native, currently targeting Android.
In my app, I'm using the @spotify/web-api-ts-sdk npm package, rather than building the web-api-ts-sdk sources into my bungles.
When the app runs in the Android emulator, I get the exception "Cannot read property 'search' of undefined" in the function redirectOrVerifyToken(), particularly the line: const hashParams = new URLSearchParams(window.location.search);
...but I believe it's expected that location is undefined in the window object of a React Native application.
So it looks to me that this code was not written with React Native in mind, and will never work.
Is this code wrong or am I wrong?
Is it my error to expect AuthorizationCodeWithPKCEStrategy to be relevant to React Native?
The text was updated successfully, but these errors were encountered:
murray-lang
changed the title
spotify-web-api-ts-sdk AuthorizationCodeWithPKCEStrategy() broken on React Native
spotify-web-api-ts-sdk AuthorizationCodeWithPKCEStrategy broken on React Native
Dec 31, 2023
I'm new to both Spotify development and React Native development, so please forgive me if I betray too much lack of understanding.
redirectOrVerifyToken()
, particularly the line:const hashParams = new URLSearchParams(window.location.search);
...but I believe it's expected that
location
is undefined in the window object of a React Native application.So it looks to me that this code was not written with React Native in mind, and will never work.
Is this code wrong or am I wrong?
Is it my error to expect
AuthorizationCodeWithPKCEStrategy
to be relevant to React Native?The text was updated successfully, but these errors were encountered: