mirror of
https://github.com/kidfromjupiter/nearby.git
synced 2026-09-16 15:36:12 -04:00
Support 3P oauth flow.
PiperOrigin-RevId: 663964316
This commit is contained in:
committed by
Copybara-Service
parent
f1a1c39177
commit
a81ce57879
@@ -55,7 +55,7 @@ class AccountManager {
|
||||
// Gets current active account. If no login user, return std::nullopt.
|
||||
virtual std::optional<Account> GetCurrentAccount() = 0;
|
||||
|
||||
// Initializes the login process for a Google account.
|
||||
// Initializes the login process for a Google account from 1P client.
|
||||
// |login_success_callback| is called when the login succeeded. Account
|
||||
// information is passed to callback.
|
||||
// |login_failure_callback| is called when the login fails.
|
||||
@@ -63,6 +63,17 @@ class AccountManager {
|
||||
absl::AnyInvocable<void(Account)> login_success_callback,
|
||||
absl::AnyInvocable<void(absl::Status)> login_failure_callback) = 0;
|
||||
|
||||
// Initializes the login process for a Google account from an oauth client.
|
||||
// |client_id| GCP client_id of the client
|
||||
// |client_secret| GCP client_secret of the client
|
||||
// |login_success_callback| is called when the login succeeded. Account
|
||||
// information is passed to callback.
|
||||
// |login_failure_callback| is called when the login fails.
|
||||
virtual void Login(
|
||||
absl::string_view client_id, absl::string_view client_secret,
|
||||
absl::AnyInvocable<void(Account)> login_success_callback,
|
||||
absl::AnyInvocable<void(absl::Status)> login_failure_callback) = 0;
|
||||
|
||||
// Logs out current active account. |logout_callback| is called when logout is
|
||||
// completed.
|
||||
virtual void Logout(
|
||||
|
||||
Reference in New Issue
Block a user