I want to know how can i handle logout.
I am using Vite + React + TS.
Right now I am just calling <button onClick={sdk.logOut}>logout</button>
But when I click on the button I get this error on the browser console TypeError: Cannot read properties of undefined (reading 'authenticationStrategy')
And indicates that the error is in this function public logOut(): void { this.authenticationStrategy.removeAccessToken(); } which is in the file SpotifyApi.ts
Extra Information:
My table content which is right below the logout button works just fine with const results = await sdk.search("The Beatles", ["artist"]); getting proper data.
I want to know how can i handle logout. I am using Vite + React + TS.
Right now I am just calling
<button onClick={sdk.logOut}>logout</button>
But when I click on the button I get this error on the browser consoleTypeError: Cannot read properties of undefined (reading 'authenticationStrategy')
And indicates that the error is in this function
public logOut(): void { this.authenticationStrategy.removeAccessToken(); }
which is in the file SpotifyApi.tsExtra Information: My table content which is right below the logout button works just fine with
const results = await sdk.search("The Beatles", ["artist"]);
getting proper data.