firebase / firebase/firebase-cpp-sdk

[Question] Disable auto-login in Firebase?

Đang mở
#1,771 0 bình luận 0 reaction 0 người được giao Xem trên GitHub
new type: question
Ngôn ngữ chính
C++
Star
326
Fork
137
Merge trung bình
3 ngày 9 giờ
Pull request đã merge (30 ngày)
5

Mô tả

### [READ] For Firebase Unity SDK question, please report to [Firebase Unity Sample](https://github.com/firebase/quickstart-unity/issues/new/choose)

Once you've read this section and determined that your issue is appropriate for this repository, please delete this section.

### [REQUIRED] Please fill in the following fields:

* Pre-built SDK from the [website](https://firebase.google.com/download/cpp) or open-source from this repo: **pre-built SDK**
* Firebase C++ SDK version: **12.7.0**
* Main Firebase Components in concern: **Auth** (Auth, Database, etc.)
* Other Firebase Components in use: _____ (Auth, Database, etc.)
* Platform you are using the C++ SDK on: **Ubuntu 24.04** (Mac, Windows, or Linux)
* Platform you are targeting: **Desktop** (iOS, Android, and/or desktop)

### [REQUIRED] Please describe the question here:

I want to disable auto-login, that is, I want to make that when the user opens my Desktop application `current_user()->is_valid()` evaluates to `false` (no currently active user).

At the moment the authentication state looks like to persist, I've tried avoiding this by signin-out as soon as I connect to the API:

```c++
m_firebase_app = firebase::App::Create(app_options);
m_firebase_auth = firebase::auth::Auth::GetAuth(m_firebase_app);
m_firebase_auth->SignOut();
m_firebase_auth->current_user().is_valid(); // Is still true with valid uid/email
```

But it does not work.

Another question: where is the authentication persisted on my local filesystem (which path)?

Hướng dẫn đóng góp

Mở hướng dẫn đóng góp

Đánh giá

Issue này chưa được đánh giá.

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.