-
Notifications
You must be signed in to change notification settings - Fork 125
Implement Firebase Auth UseUserAccessGroup for C++ SDK #1758
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
Changes from 1 commit
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -373,5 +373,18 @@ AUTH_RESULT_FN(Auth, SignInWithEmailAndPassword, AuthResult) | |
|
||
AUTH_RESULT_FN(Auth, CreateUserWithEmailAndPassword, AuthResult) | ||
|
||
// Platform-specific implementation of UseUserAccessGroup. | ||
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. Don't pu tthe platform-specific implementation here, put it in auth_android and auth_desktop and auth_ios. |
||
// This is defined in auth_ios.mm for iOS, and auth_stub.cc for other | ||
// platforms. | ||
AuthError UseUserAccessGroupInternal(AuthData* auth_data, | ||
const char* group_id); | ||
|
||
AuthError Auth::UseUserAccessGroup(const char* group_id) { | ||
if (!auth_data_) { | ||
return kAuthErrorUninitialized; | ||
} | ||
return UseUserAccessGroupInternal(auth_data_, group_id); | ||
} | ||
|
||
} // namespace auth | ||
} // namespace firebase |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
// Copyright 2023 Google LLC | ||
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. This file should not exist, please put the stub implementations in the Android and Desktop files that already exist. |
||
// | ||
// Licensed under the Apache License, Version 2.0 (the "License"); | ||
// you may not use this file except in compliance with the License. | ||
// You may obtain a copy of the License at | ||
// | ||
// http://www.apache.org/licenses/LICENSE-2.0 | ||
// | ||
// Unless required by applicable law or agreed to in writing, software | ||
// distributed under the License is distributed on an "AS IS" BASIS, | ||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
// See the License for the specific language governing permissions and | ||
// limitations under the License. | ||
|
||
#include "auth/src/include/firebase/auth_error.h" | ||
#include "auth/src/common.h" // For AuthData | ||
|
||
namespace firebase { | ||
namespace auth { | ||
|
||
// Stub implementation for UseUserAccessGroupInternal on non-iOS platforms. | ||
AuthError UseUserAccessGroupInternal(AuthData* auth_data, | ||
const char* group_id) { | ||
// This function is a no-op on non-iOS platforms. | ||
(void)auth_data; | ||
(void)group_id; | ||
return kAuthErrorNone; | ||
} | ||
|
||
// Other stub functions that are not implemented on desktop/non-mobile | ||
// should also go here. For example, if there were other iOS or Android | ||
// specific internal functions called from auth.cc | ||
|
||
} // namespace auth | ||
} // namespace firebase |
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.
Desktop needs this too.