# Google refresh token not persisted

**URL:** <https://community.auth0.com/t/google-refresh-token-not-persisted/79593>\
**Category:** Get Help\
**Tags:** google, refresh-token\
**Created:** [March 9, 2022, 4:15pm UTC](https://community.auth0.com/t/google-refresh-token-not-persisted/79593 "2022-03-09T16:15:11Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![steven.oeyen](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/steven.oeyen/32/33282_2.png) [@steven.oeyen](https://community.auth0.com/u/steven.oeyen)\
**Post date:** [March 9, 2022, 4:15pm UTC](https://community.auth0.com/t/google-refresh-token-not-persisted/79593/1 "2022-03-09T16:15:11Z")

</div>

Hi,

for an application where we need to be able to Google Drive api for users I’ve setup a login flow that will request the required scope and set the access type as offline. For interacting with the Google Drive api, a refresh token is required.

The initial call is working as expected. I can then use the Auth0 api to get the full user profile, which will then include the needed access\_token and refresh token in the identities property.  
So far so good, but when I log out from our application and go through the login procedure, the next time I request the user profile, the refresh token is missing.

As I understood, Google only exchanges the refresh on the first authentication, but it seems odd that this will clear the refresh token from the identies in the user profile.

The only solution I found so far is to include “approval\_prompt=force” query parameter. But this results in a redundant constent screen being displayed every time a user logs in.

Is there any other way round this? I would prefer not to store the refresh token on our own server.

---

<div class="post-metadata">

**Author:** ![lihua.zhang](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/lihua.zhang/32/39683_2.png) [@lihua.zhang](https://community.auth0.com/u/lihua.zhang)\
**Post date:** [March 9, 2022, 7:58pm UTC](https://community.auth0.com/t/google-refresh-token-not-persisted/79593/3 "2022-03-09T19:58:02Z")

</div>

Hi @steven.oeyen ,

Welcome to the Auth0 Community!

I did some research around this topic, and looks like the only solution is what you have described.

Adding `access_type=offline&approval_prompt=force` to the authentication request, then Auth0 forwards those parameters to Google, and Google returns an `access_token` and an `refresh_token`.

I understand that you don’t want users to see a redundant consent screen being displayed every time they log in. You are welcome to submit your feedback [here](https://auth0.com/feedback?_ga=2.243799680.487284953.1645508640-33930111.1644863583&_gl=1*1f3a3d0*rollup_ga*MzM5MzAxMTEuMTY0NDg2MzU4Mw..*rollup_ga_F1G3E656YZ*MTY0NTU3NjU4NS4zNC4xLjE2NDU1Nzk4NzkuMTM.). Hopefully it can attract more votes and be implemented soon.

---

<div class="post-metadata">

**Author:** ![steven.oeyen](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/steven.oeyen/32/33282_2.png) [@steven.oeyen](https://community.auth0.com/u/steven.oeyen)\
**Post date:** [March 10, 2022, 8:30am UTC](https://community.auth0.com/t/google-refresh-token-not-persisted/79593/5 "2022-03-10T08:30:49Z")

</div>

hi @lihua.zhang,  
thanks for the quick follow up.  
In that case I guess we will have to settle for that solution for now. I would be nice to somehow store those refresh tokens in Auth0 in the future

---

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/auth0/original/3X/b/5/b560f266932fcce5d57f09a6595bd50518cae3f3.jpeg) [@system](https://community.auth0.com/u/system)\
**Post date:** [March 25, 2022, 8:31am UTC](https://community.auth0.com/t/google-refresh-token-not-persisted/79593/6 "2022-03-25T08:31:37Z")

</div>

This topic was automatically closed 15 days after the last reply. New replies are no longer allowed.
