Google SignUp/Login using PHP backend and client as web and android -


so trying implement google login in application. on client side have android app , web app interact restful api server in php (cartalyst sentinel 2.0 authentication).

i facing multiple issues.

  1. redirect uri

    //setting google api client $client = new google_client(); $client->setclientid($client_id_web); $client->setclientsecret($client_secret_web); $client->setredirecturi($redirecturi); $client->setscopes(array('https://www.googleapis.com/auth/userinfo.email','https://www.googleapis.com/auth/userinfo.profile','https://www.googleapis.com/auth/plus.me'));

    to instantiate client need provide redirect uri. in case of client being webapp there seems no issue providing same redirect uri @ client , server end. when comes android there no redirect uri. read somewhere 'postmessage' redirect uri works didn't me. without redirect uri client throws error of "invalid json token"

any on ?

  1. cartalyst_sentinel cookie null in requests web client.

there seemes no issue in case of normal login(api.domain.xyz/login) through credentials. when @ server end login client different route(api.domain.xyz/blabla/google/login) value cartalyst_sentinel cookie goes null though set cookie headers sent response headers. set-cookie header being sent(there two, worries me works way in case of native login)

cookie becoming null in requests follow after login

i have read lot these issues , have tried n number of methods none seem working.

there 2 things seemed bit valid.

  • the case of redirect uri can sorted out instantiating google api client config file(google json or developer key maybe).

  • the case of missing cookie due cross domain cookies or maybe due login being done through nested route(sounds silly know, found somewhere in google).

any appreciated.


Comments