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

Feature Request: Add Ability To Signout With User ID #296

Open
clarnx opened this issue May 13, 2021 · 0 comments
Open

Feature Request: Add Ability To Signout With User ID #296

clarnx opened this issue May 13, 2021 · 0 comments

Comments

@clarnx
Copy link

clarnx commented May 13, 2021

The current API for both JavaScript and NodeJS does not support signing out by providing a userID. This will be useful for the Nodejs SDK especially where you send the user id in the request from the client side and then sign the user out on the backend. This will enable you to write custom server side logic.

Example:

Userbase.signOut("user id here").then(() => console.log("user signed out"));

On Node.js let's say you create your first user and then Sign out, then create a second user after.
When you try to sign out the second user that is that is signed in, you get an error thrown that the user is already signed out.

I noticed this because I realised that the Userbase.init(...) function in the Node.js SDK does not return a session like the client side JavaScript SDK does.

This means the Userbase context will always be the same and link to the first user created on every server request from the client

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

No branches or pull requests

1 participant