I am working in an Angular app, I want to add Gmail in this Angular app.
I have followed this tutorial https://medium.com/@mcflyDev/angular-2-or-4-import-google-contacts-d0ffb13d8626
everything is working fine and I am getting the success response with access_token but I am not getting authorization_code.
How can I get authorization_code?
Here is my configuration:
this.auth2 = gapi.auth2.init({
client_id: 'bla-bla-bla-2.apps.googleusercontent.com',
cookiepolicy: 'single_host_origin',
scope: 'https://www.googleapis.com/auth/gmail.readonly',
access_type: 'offline',
response_type: 'code',
auth_uri: 'https://accounts.google.com/o/oauth2/v2/auth',
prompt: 'select_account',
include_granted_scopes: true,
grant_type: 'authorization_code',
});
Also, I am also not getting refresh_token, as you can see I have already set access_type: 'offline'.
I am getting this response as shown in the above image.
Thanks.

POSTAjax call?