This repository was archived by the owner on Apr 18, 2026. It is now read-only.
Description Hi there,
Please help resolve my problem, I want to get refresh_token when user login with google use javascript.
This is my code.
< script >
window.gapi;
window.ggInit = options => {
gapi . load ( 'auth2' , function ( ) {
window . gapi = gapi ;
gapi . auth2 . init ( options ) . then ( ( ) => {
window . GoogleAuth = gapi . auth2 . getAuthInstance ( ) ;
} ) ;
} ) ;
} ;
</ script >
if ( window . GoogleAuth ) {
window . GoogleAuth . signIn ( {
scope : 'profile email https://www.googleapis.com/auth/adwords' ,
access_type : 'offline' ,
prompt : 'consent' ,
} )
. then ( googleUser => {
this . loginGoogleCallback ( googleUser ) ;
} )
. catch ( err => {
console . log ( 'Err' , err ) ;
} ) ;
}
This is response data
access_token: ""
expires_at: 1561026652957
expires_in: 3600
first_issued_at: 1561023052957
id_token: ""
idpId: "google"
login_hint: ""
scope: "email profile https://www.googleapis.com/auth/userinfo.profile openid https://www.googleapis.com/auth/adwords https://www.googleapis.com/auth/userinfo.email"
session_state: { extraQueryParams : { …} }
token_type: "Bearer" Reactions are currently unavailable
Hi there,
Please help resolve my problem, I want to get refresh_token when user login with google use javascript.
This is my code.