AuthCredentialsTemplate.h 2.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  1. /*
  2. * Copyright 2017 Google
  3. *
  4. * Licensed under the Apache License, Version 2.0 (the "License");
  5. * you may not use this file except in compliance with the License.
  6. * You may obtain a copy of the License at
  7. *
  8. * http://www.apache.org/licenses/LICENSE-2.0
  9. *
  10. * Unless required by applicable law or agreed to in writing, software
  11. * distributed under the License is distributed on an "AS IS" BASIS,
  12. * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  13. * See the License for the specific language governing permissions and
  14. * limitations under the License.
  15. */
  16. /*
  17. Some of the Auth Credentials needs to be populated for the Sample build to work.
  18. Please follow the following steps to populate the valid AuthCredentials
  19. and copy it to AuthCredentials.h file
  20. You will need to replace the following values:
  21. $KGOOGLE_CLIENT_ID
  22. Get the value of the CLIENT_ID key in the GoogleService-Info.plist file..
  23. $KFACEBOOK_APP_ID
  24. FACEBOOK_APP_ID is the developer's Facebook app's ID, to be used to test the
  25. 'Signing in with Facebook' feature of Firebase Auth. Follow the instructions
  26. on the Facebook developer site: https://developers.facebook.com/docs/apps/register
  27. to obtain such an id
  28. $KAPP_ACCESS_TOKEN
  29. Once you have an Facebook App Id, click on dashboard from your app you can see
  30. both your App ID and the App Secret. Once you have both of these generate the
  31. access token using the step 13 of https://smashballoon.com/custom-facebook-feed/access-token/
  32. Follow the same link for comprehensive information on how to get the access token.
  33. $KGOOGLE_TEST_ACCOUNT_REFRESH_TOKEN
  34. GOOGLE_TEST_ACCOUNT_REFRESH_TOKEN is the Google SignIn refresh token obtained for the Google client ID,
  35. saved for continuous tests.
  36. The users that are behind these tokens must have user names as declared in the code, i.e.,
  37. "John Test" for Google and "MichaelTest" for Facebook, or the FirebearApiTests will fail.
  38. This can be found in ApiTests/FirebearApiTests.m with variable names kFacebookTestAccountName and
  39. kGoogleTestAccountName
  40. */
  41. #define KAPP_ACCESS_TOKEN $KAPP_ACCESS_TOKEN
  42. #define KFACEBOOK_APP_ID $KFACEBOOK_APP_ID
  43. #define KGOOGLE_CLIENT_ID $KGOOGLE_CLIENT_ID
  44. #define KGOOGLE_TEST_ACCOUNT_REFRESH_TOKEN $KGOOGLE_TEST_ACCOUNT_REFRESH_TOKEN