КОИНС.Студия - Статьи - Инсталляция и настройка программ - Sign in with Google for Cordova application.

Sign in with Google for Cordova application.

This instruction is written using article https://github.com/EddyVerbruggen/cordova-plugin-googleplus

  1. Both iOS and Android applications must be registered in https://console.firebase.google.com/
    Also the applications are registered there for push notifications work.

  2. Download file GoogleService-Info.plist from this site.
    Get the value of field REVERSED_CLIENT_ID in this file.
    Go to your application sources. Open file config.xml. Replace occurrences of string [GOOGLE_REVERSED_CLIENT_ID] with the value.

  3. Also in this site for Android application specify SHA1 of the certificate that is used to subscribe the application. For the main certificate that is used for all applications it is: 2A:FC:6B:F0:7F:20:3F:A9:2D:43:84:D3:6A:5D:B8:B4:8F:7A:F7:2F
    If you are using another certificate, get its SHA1. Read there how to do this: https://developers.google.com/drive/android/auth

  4. At the same site open page “Authentication”, tab “Sign-in method” and enable method “Google”.

  5. Also the application must be registered in https://console.developers.google.com/
    It must be created automatically when it is created in Firebase.

  6. In this site open page “Credentials”, find chapter “OAuth 2.0 Client ID”, in this chapter find item “Web client”.
    Open “Web client”. Get values of next fields:
    • Client ID

    • Client secret

    • Authorized redirect URI

  7. Go to Wellnessliving server. Open page Site - Client app content.
    There must be your application. Open it.
    In chapter Google Application fill fields Client ID, Client secret, Redirect URI by values form https://console.developers.google.com/

  8. Go to your application sources.
    Open file www/js/google.plus.js. Replace occurrences of string [GOOGLE_CLIENT_ID] with value of Client ID in https://console.developers.google.com/.

  9. On site https://console.cloud.google.com/ go to Library.
    Type People in search.
    Select Google People API from search results.
    Click button Enable.

Последняя модификация: 29.01.21 16:58