Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
InfoBefore starting, please

User authentication

In order to use the Google SSO, the XCALLY users must have the proper Google account set as "email" in the Motion Staff section.

Image Added

If they are already logged into the Chrome browser, they need just to click on 

Image Added

Otherwise, Google will ask them the account credentials

Image Added

  • Please check in the General Settings the Single Sign-On property has been turned on!

Image Removed
  • inserire screeshot


Creating a Google API Console project and client ID

InfoFor any additional information please refer

  • Access to the

Official
  • Google

Documentation hereGo to the Google Click on the credentials tab and select or add
  • Select or create a new project

Image Removed

Image Removed

  • Create a project if you need
Image Removed

STAMP

  • apiS & sERVICES

  • Click on the credentials

STAMP SSO 1


  • Create CREDENTIALS

STAMP SSO


  • Now you can add the credentials to access the APIs, click "Create credentials" and select "OAuth client ID"

Image RemovedSTAMP

Image Removed

  • Configure the consent screen if required

Image Removed

Image Removed

  • Once you complete the consent screen configuration, you can continue to creating credentials

Image Removed

Note
  • SELECT WEB APPLICATION

STAMP SSO

REDIRECT URI : HTTPS… MOTION DOMAIN/API/callback + ADD uri

Insert in the authorized URIs field the URI related your Motion server

https://{{MOTION_IP}}/api/auth/google/callback

  • Save and get you client credentials

Image Removed

Enable Google People API: browse the APIs libraries and select the Google People API
Image Removed Page Properties
hiddentrue
Related issues

STAMP SSO 6

  • ti da le credenziali (valori che devi inserire in ssh)

CLiENT ID

CLIENT SECRET

URI


VAI IN SSH

ENTRA COME MOTION con comando :

su motion

poi comando:

cd /var/opt/motion2

poi

nano .env

STAMP DEL SERVER SSO 7

  • RIMUOVI Il cancelletto (uncomment) dei valori

  • inserisci i valori (tra le ' )

Google ID è CLiENT ID

CLIENT SECRET

DOmani è URI

  • CRTL X per salvare

  • Y per dare ok per confermare modifiche

  • dai invio


Ri-inizializza le variabili appena modificate con comando:

npm run initialize

Note

questo comando riavvia i serivizi di motion !

  • Make sure that services are up by running pm2 list


Motion server configuration

edit the file /var/opt/motion2/server/config/environment/production.js

and replace the following rows:

Code Block
languagejs
google: {
        clientID: process.env.GOOGLE_ID || 'id',
        clientSecret: process.env.GOOGLE_SECRET || 'secret',
        callbackURL: (process.env.DOMAIN || 'https://YOUR_MOTION_IP') + '/api/auth/google/callback'
    }

with the Google application ID, example:

Code Block
languagejs
   google: {
        clientID: process.env.GOOGLE_ID || '1234567890-abcdefghijklmnopqrstuvwxyz.apps.googleusercontent.com',
        clientSecret: process.env.GOOGLE_SECRET || 'abc-123456abcdefghijklmn',
        callbackURL: (process.env.DOMAIN || 'https://pbx2.xcally.com') + '/api/auth/google/callback'
    }


restart the motion service to apply the change

Code Block
su motion
pm2 restart motion2

User authentication

In order to use the Google SSO, the XCALLY users must have the proper Google account set as "email" in the Motion Staff section.

Image Removed

If they are already logged into the Chrome browser, they need just to click on 

Image Removed

Otherwise, Google will ask them the account credentials

Image Removed

Filter by label (Content by label)
showLabelsfalse
max5
spacesXMV
showSpacefalse
sortmodified
reversetrue
typepage
cqllabel in ( "google" , "users" , "web-interface" , "agents" , "sso" ) and type = "page" and space = "XMV"
labelsGoogle SSO web-interface agents users



For any additional information please refer to the Official Google Documentation here