Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Vue SDK: usage example mistake: 'logout' utility #810

Closed
camslice opened this issue Sep 29, 2024 · 3 comments · Fixed by #813
Closed

Vue SDK: usage example mistake: 'logout' utility #810

camslice opened this issue Sep 29, 2024 · 3 comments · Fixed by #813
Assignees

Comments

@camslice
Copy link

Usage example:

<button @click="logout">Logout</button>

Throws an error in the dev tools console:

Uncaught (in promise) Error: "token" must be string or undefined

Usage example should be updated as follows:

<button @click="logout()">Logout</button>

This passes undefined to logout()

@asafshen
Copy link
Member

hey @camslice

is it possible that the user is not logged in?

to debug this, do you see DSR in locale storage or on cookie?

@camslice
Copy link
Author

hey @asafshen

user is definitely logged in.  i can see the DSR In both local storage and in a cookie.

i think the issue is that the default parameter passed to a Vue @click directive is the event, which is an object.

this:

<button @click="logout">Logout</button>

is the same as this:

<button @click="logout($event)">Logout</button>

logout is expecting a string or undefined

cam

@camslice camslice changed the title Descope Vue SDK logout usage example mistake Vue SDK: usage example mistake: 'logout' utility Sep 29, 2024
@camslice
Copy link
Author

camslice commented Oct 1, 2024

@asafshen 🙏

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants