<@498057949541826571> Why do I always get a new de...
# support-questions
w
@rp Why do I always get a new device Id (and pre-auth id) for passwordless (OTP) login even if I'm using the same device?
r
Hey
Cause each passwordless auth attempt is essentially stateless
These are IDs that are meaningful only in that passwordless login session. The next time you sign in, it’s like a new passwordless auth session. So new IDs
w
so if I want something like whatsapp - can only use my app on one device at a time. how can I do that ?
r
Right. In that case, you can override the createNewSession function on the backend and check how many sessions exist for the input.userId
If more than 0 sessions exist, you can throw an error and deny login
Or, you can revoke the existing session and go ahead and create a new one
w
oh okay. can share some reference for this?
r
Which backend SDK?
w
nodejs
r
w
thanks
@Fabio Aguiar check this
f
It seams perfect. Tks @rp
3 Views