-
Notifications
You must be signed in to change notification settings - Fork 124
Implement UseUserAccessGroup for Firebase Auth C++ SDK #1757
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Closed
Closed
Changes from all commits
Commits
Show all changes
3 commits
Select commit
Hold shift + click to select a range
41eb0e2
Implement UseUserAccessGroup for Firebase Auth C++ SDK
google-labs-jules[bot] c8f87a3
Address review comments for UseUserAccessGroup implementation
google-labs-jules[bot] c380f02
Adjust UseUserAccessGroup integration test per review
google-labs-jules[bot] File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -575,6 +575,11 @@ void Auth::UseEmulator(std::string host, uint32_t port) { | |
auth_impl->assigned_emulator_url.append(std::to_string(port)); | ||
} | ||
|
||
AuthError Auth::UseUserAccessGroup(const char* access_group) { | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. We need an Android stub as well. |
||
// This is an iOS-only feature. No-op on other platforms. | ||
return kAuthErrorNone; | ||
} | ||
|
||
void InitializeTokenRefresher(AuthData* auth_data) { | ||
auto auth_impl = static_cast<AuthImpl*>(auth_data->auth_impl); | ||
auth_impl->token_refresh_thread.Initialize(auth_data); | ||
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -517,6 +517,19 @@ class Auth { | |
/// not available on the current device. | ||
static Auth* GetAuth(App* app, InitResult* init_result_out = nullptr); | ||
|
||
/// @brief Specifies a user access group for iCloud keychain access. | ||
/// | ||
/// This method is only functional on iOS. On other platforms, it is a no-op | ||
/// and will always return `kAuthErrorNone`. | ||
/// | ||
/// @param[in] access_group The user access group to use. Set to `nullptr` | ||
/// to use the default access group. An empty string will be passed as an | ||
/// empty string. | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. We don't need to call out that the empty string is passed in special. |
||
/// | ||
/// @return `kAuthErrorNone` on success, or an AuthError code if an error | ||
/// occurred. | ||
AuthError UseUserAccessGroup(const char* access_group); | ||
|
||
private: | ||
/// @cond FIREBASE_APP_INTERNAL | ||
friend class ::firebase::App; | ||
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Since we have this stubbed out on other platforms, let's make sure that works and run this test on all platforms.