Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
430 views
in Technique[技术] by (71.8m points)

ios - Firebase Auth Login must allow single device login

I am developing app with the help of Firebase backend and I am using Firebase Auth for login into my application. I have done all integration and every thing and my app is working fine.

But I want only single session with single user as right now with single userId I am able to login through multiple devices.

So I want to restrict user that at a time user can login in in single device.

I am using Custom auth with username password login :

Auth.auth().signIn(withCustomToken: customToken ?? "") { (user, error) in
  // ...
}

If user login with same id in another device I want to show alert that "You are already logged in another device".

Is there any possibility in Firebase Auth lib for single user single session?

Edit : Suggested duplicate question will not solve my query fully though it help me to understand scenireo and help to solve my problem.

Thanks @Frenk for pointing this out.

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)
Waitting for answers

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...