Skip to content

What would be a proper way to handle logout? #29

@sspenst

Description

@sspenst

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions