Credentials.swift 2.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960
  1. /*
  2. * Copyright 2020 Google LLC
  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. import Foundation
  17. /*
  18. Some of the Auth Credentials needs to be populated for the SwiftApiTests to work.
  19. Please follow the following steps to populate the valid AuthCredentials
  20. and copy it to Credentials.swift file
  21. You will need to replace the following values:
  22. $KGOOGLE_CLIENT_ID
  23. Get the value of the CLIENT_ID key in the GoogleService-Info.plist file..
  24. $KGOOGLE_TEST_ACCOUNT_REFRESH_TOKEN
  25. GOOGLE_TEST_ACCOUNT_REFRESH_TOKEN is the Google SignIn refresh token obtained for the Google client
  26. ID, saved for continuous tests.
  27. $KGOOGLE_USER_NAME
  28. The name of the test user for Google SignIn.
  29. $KFACEBOOK_APP_ID
  30. FACEBOOK_APP_ID is the developer's Facebook app's ID, to be used to test the
  31. 'Signing in with Facebook' feature of Firebase Auth. Follow the instructions
  32. on the Facebook developer site: https://developers.facebook.com/docs/apps/register
  33. to obtain such an id.
  34. $KFACEBOOK_APP_ACCESS_TOKEN
  35. Once you have an Facebook App Id, click on dashboard from your app you can see
  36. both your App ID and the App Secret. Once you have both of these generate the
  37. access token using the step 13 of https://smashballoon.com/custom-facebook-feed/access-token/
  38. Follow the same link for comprehensive information on how to get the access token.
  39. $KFACEBOOK_USER_NAME
  40. The name of the test user for Facebook Login.
  41. */
  42. class Credentials {
  43. static let kGoogleClientID = KGOOGLE_CLIENT_ID
  44. static let kGoogleTestAccountRefreshToken = KGOOGLE_TEST_ACCOUNT_REFRESH_TOKEN
  45. static let kGoogleUserName = KGOOGLE_USER_NAME
  46. static let kFacebookAppID = KFACEBOOK_APP_ID
  47. static let kFacebookAppAccessToken = KFACEBOOK_APP_ACCESS_TOKEN
  48. static let kFacebookUserName = KFACEBOOK_USER_NAME
  49. }