Credentials.swift 2.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758
  1. // Copyright 2020 Google LLC
  2. //
  3. // Licensed under the Apache License, Version 2.0 (the "License");
  4. // you may not use this file except in compliance with the License.
  5. // You may obtain a copy of the License at
  6. //
  7. // http://www.apache.org/licenses/LICENSE-2.0
  8. //
  9. // Unless required by applicable law or agreed to in writing, software
  10. // distributed under the License is distributed on an "AS IS" BASIS,
  11. // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  12. // See the License for the specific language governing permissions and
  13. // limitations under the License.
  14. import Foundation
  15. /*
  16. Some of the Auth Credentials needs to be populated for the SwiftApiTests to work.
  17. Please follow the following steps to populate the valid AuthCredentials
  18. and copy it to Credentials.swift file
  19. You will need to replace the following values:
  20. $KGOOGLE_CLIENT_ID
  21. Get the value of the CLIENT_ID key in the GoogleService-Info.plist file..
  22. $KGOOGLE_TEST_ACCOUNT_REFRESH_TOKEN
  23. GOOGLE_TEST_ACCOUNT_REFRESH_TOKEN is the Google SignIn refresh token obtained for the Google client
  24. ID, saved for continuous tests.
  25. $KGOOGLE_USER_NAME
  26. The name of the test user for Google SignIn.
  27. $KFACEBOOK_APP_ID
  28. FACEBOOK_APP_ID is the developer's Facebook app's ID, to be used to test the
  29. 'Signing in with Facebook' feature of Firebase Auth. Follow the instructions
  30. on the Facebook developer site: https://developers.facebook.com/docs/apps/register
  31. to obtain such an id.
  32. $KFACEBOOK_APP_ACCESS_TOKEN
  33. Once you have an Facebook App Id, click on dashboard from your app you can see
  34. both your App ID and the App Secret. Once you have both of these generate the
  35. access token using the step 13 of https://smashballoon.com/custom-facebook-feed/access-token/
  36. Follow the same link for comprehensive information on how to get the access token.
  37. $KFACEBOOK_USER_NAME
  38. The name of the test user for Facebook Login.
  39. */
  40. class Credentials {
  41. static let kGoogleClientID = KGOOGLE_CLIENT_ID
  42. static let kGoogleTestAccountRefreshToken = KGOOGLE_TEST_ACCOUNT_REFRESH_TOKEN
  43. static let kGoogleUserName = KGOOGLE_USER_NAME
  44. static let kFacebookAppID = KFACEBOOK_APP_ID
  45. static let kFacebookAppAccessToken = KFACEBOOK_APP_ACCESS_TOKEN
  46. static let kFacebookUserName = KFACEBOOK_USER_NAME
  47. }