const body = new URLSearchParams({
code,
client_id: this.clientId,
client_secret: this.clientSecret,
redirect_uri: this.redirectUrl,
grant_type: "authorization_code",
});
const res = await fetch("https://oauth2.googleapis.com/token", {
method: "POST",
headers: {
"Content-Type": "application/x-www-form-urlencoded",
},
body,
});
const body = new URLSearchParams({
code,
client_id: this.clientId,
client_secret: this.clientSecret,
redirect_uri: this.redirectUrl,
grant_type: "authorization_code",
});
const res = await fetch("https://oauth2.googleapis.com/token", {
method: "POST",
headers: {
"Content-Type": "application/x-www-form-urlencoded",
},
body,
});