meisan
(Matt)
June 16, 2021, 10:01pm
1
I am trying to create a custom app to sync certain data between freshservice and Google. I have created a simple app that is a cut and paste from the OAuth example in the documentation. After authorizing with Google successfully, I get an error message that says “Access token cannot be refreshed”
I assume that most of the OAuth stuff is handled server-side, so how should I begin troubleshooting this?
1 Like
arshath.h
(Arshath H)
June 17, 2021, 6:27am
3
@meisan Could you please share your oauth_config.json?
Note: Hide the sensitive data.
meisan
(Matt)
June 17, 2021, 12:00pm
4
I had to remove the redirect URIs and javascript origins due to the link limits on the forum, but I have verified those are working as expected.
{
“client_id”: “notarealid”,
“client_secret”: “supersecret”,
“authorize_url”: “Anmelden – Google Konten ”,
“token_url”: “https://oauth2.googleapis.com/token ”,
“options”: {
“project_id”: “my-project-name-here”,
“auth_provider_x509_cert_url”: “https://www.googleapis.com/oauth2/v1/certs ”,
“redirect_uris”: [
// removed due to link limits
],
“javascript_origins”: [
// removed due to link limits
],
“scope”: “https://www.googleapis.com/auth/admin.directory.device.chromeos ”
},
“token_type”: “account”
}
1 Like
arshath.h
(Arshath H)
June 18, 2021, 7:22am
5
@meisan I was able to successfully get access token using the below
{
"client_id": "enteryourclientid",
"client_secret": "enteryourclientsecret",
"authorize_url": "https://accounts.google.com/o/oauth2/auth",
"token_url": "https://oauth2.googleapis.com/token",
"options": {
"scope": "https://mail.google.com/"
},
"token_type": "account"
}
In your google project, add the below redirect URIs
http://localhost:10001/auth/callback?callback=http://localhost:10001/custom_configs?product= freshservice&product= freshservice
https://oauth.freshdev.io/auth/callback
2 Likes
system
(system)
Closed
February 20, 2022, 12:12pm
8
This topic was automatically closed 6 days after the last reply. New replies are no longer allowed.