Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
432 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 Reply

0 votes
by (71.8m points)
Waitting for answers

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...