File tree Expand file tree Collapse file tree 4 files changed +35
-0
lines changed Expand file tree Collapse file tree 4 files changed +35
-0
lines changed Original file line number Diff line number Diff line change @@ -676,5 +676,10 @@ void DisableTokenAutoRefresh(AuthData* auth_data) {}
676
676
void InitializeTokenRefresher (AuthData* auth_data) {}
677
677
void DestroyTokenRefresher (AuthData* auth_data) {}
678
678
679
+ AuthError Auth::UseUserAccessGroup (const char * user_access_group) {
680
+ // This is an iOS-only feature. No-op on Android.
681
+ return kAuthErrorNone ;
682
+ }
683
+
679
684
} // namespace auth
680
685
} // namespace firebase
Original file line number Diff line number Diff line change @@ -768,5 +768,10 @@ void IdTokenRefreshThread::DisableAuthRefresh() {
768
768
ref_count_--;
769
769
}
770
770
771
+ AuthError Auth::UseUserAccessGroup (const char * user_access_group) {
772
+ // This is an iOS-only feature. No-op on desktop.
773
+ return kAuthErrorNone ;
774
+ }
775
+
771
776
} // namespace auth
772
777
} // namespace firebase
Original file line number Diff line number Diff line change @@ -517,6 +517,20 @@ class Auth {
517
517
// / not available on the current device.
518
518
static Auth* GetAuth (App* app, InitResult* init_result_out = nullptr );
519
519
520
+ // / @brief Sets the user access group to use for keychain operations.
521
+ // /
522
+ // / @param[in] user_access_group The user access group ID. For an app to share
523
+ // / keychain items with other apps, it must be a member of an access group.
524
+ // / For more information, see
525
+ // / https://developer.apple.com/documentation/security/keychain_services/keychain_items/sharing_access_to_keychain_items_among_a_collection_of_apps
526
+ // /
527
+ // / @return Returns `kAuthErrorNone` on success, or an error code if the
528
+ // / operation failed.
529
+ // /
530
+ // / @note This method is only applicable to iOS. On other platforms, it is a
531
+ // / stub and will always return `kAuthErrorNone`.
532
+ AuthError UseUserAccessGroup (const char * user_access_group);
533
+
520
534
private:
521
535
// / @cond FIREBASE_APP_INTERNAL
522
536
friend class ::firebase::App;
Original file line number Diff line number Diff line change @@ -608,5 +608,16 @@ void DisableTokenAutoRefresh(AuthData *auth_data) {}
608
608
void InitializeTokenRefresher (AuthData *auth_data) {}
609
609
void DestroyTokenRefresher (AuthData *auth_data) {}
610
610
611
+ AuthError Auth::UseUserAccessGroup (const char * user_access_group) {
612
+ if (!auth_data_) {
613
+ return kAuthErrorUninitialized ;
614
+ }
615
+ NSString * ns_user_access_group =
616
+ user_access_group ? [NSString stringWithUTF8String: user_access_group] : nil ;
617
+ NSError * error = nil ;
618
+ [AuthImpl (auth_data_) useUserAccessGroup: ns_user_access_group error: &error];
619
+ return AuthErrorFromNSError (error);
620
+ }
621
+
611
622
} // namespace auth
612
623
} // namespace firebase
You can’t perform that action at this time.
0 commit comments