AuthCredentialsTemplate.h 2.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768
  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 ApiTests 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. $KGOOGLE_TEST_ACCOUNT_REFRESH_TOKEN
  24. GOOGLE_TEST_ACCOUNT_REFRESH_TOKEN is the Google SignIn refresh token obtained for the Google client
  25. ID, saved for continuous tests.
  26. $KGOOGLE_USER_NAME
  27. The name of the test user for Google SignIn.
  28. $KFACEBOOK_APP_ID
  29. FACEBOOK_APP_ID is the developer's Facebook app's ID, to be used to test the
  30. 'Signing in with Facebook' feature of Firebase Auth. Follow the instructions
  31. on the Facebook developer site: https://developers.facebook.com/docs/apps/register
  32. to obtain such an id.
  33. $KFACEBOOK_APP_ACCESS_TOKEN
  34. Once you have an Facebook App Id, click on dashboard from your app you can see
  35. both your App ID and the App Secret. Once you have both of these generate the
  36. access token using the step 13 of https://smashballoon.com/custom-facebook-feed/access-token/
  37. Follow the same link for comprehensive information on how to get the access token.
  38. $KFACEBOOK_USER_NAME
  39. The name of the test user for Facebook Login.
  40. $KCUSTOM_AUTH_TOKEN_URL
  41. A URL to return a Custom Auth token.
  42. $KCUSTOM_AUTH_TOKEN_EXPIRED_URL
  43. A URL to return an expired Custom Auth token.
  44. $KCUSTOM_AUTH_USER_ID
  45. The ID of the test user in the Custom Auth token.
  46. */
  47. #define KGOOGLE_CLIENT_ID $KGOOGLE_CLIENT_ID
  48. #define KGOOGLE_TEST_ACCOUNT_REFRESH_TOKEN $KGOOGLE_TEST_ACCOUNT_REFRESH_TOKEN
  49. #define KGOOGLE_USER_NAME $KGOOGLE_USER_NAME
  50. #define KFACEBOOK_APP_ID $KFACEBOOK_APP_ID
  51. #define KFACEBOOK_APP_ACCESS_TOKEN $KFACEBOOK_APP_ACCESS_TOKEN
  52. #define KFACEBOOK_USER_NAME $KFACEBOOK_USER_NAME
  53. #define KCUSTOM_AUTH_TOKEN_URL $KCUSTOM_AUTH_TOKEN_URL
  54. #define KCUSTOM_AUTH_TOKEN_EXPIRED_URL $KCUSTOM_AUTH_TOKEN_EXPIRED_URL
  55. #define KCUSTOM_AUTH_USER_ID $KCUSTOM_AUTH_USER_ID