Request consent every time with google auth, Cordova + ionic 2

I use this Cordova GooglePlus Plugin to log in to Google Accounts. The problem is that I can get the update token in the first request. I would like to have this token every time.

I read that adding a parameter prompt=consentwill make it ask for consent every time I log in, and I get an update token every time.

I just don't know where to add this parameter to achieve this.

I log in using:

    let opts = {
        scopes: "SCOPE1 SCOPE2",
        webClientId: WEBCLIENTID,
        offline: true
    }
    GooglePlus.login(opts)

Can anybody help me?

thank

+5
source share
2 answers

authentication request.

, prompt = permission . = , . = .

URI -

0

:

this.afAuth.auth       .signInWithPopup(new firebase.auth.GoogleAuthProvider(). setCustomParameters ({prompt: 'select_account'}))       .then(() => {         //

    },(err) => {
      console.log("Error in auh service" + err);
     reject(err);
   })
0

Source: https://habr.com/ru/post/1675530/


All Articles