# Auth0 android kotlin refresh token

**URL:** <https://community.auth0.com/t/auth0-android-kotlin-refresh-token/152023>\
**Category:** Get Help\
**Tags:** apis, application\
**Created:** [November 21, 2024, 1:27am UTC](https://community.auth0.com/t/auth0-android-kotlin-refresh-token/152023 "2024-11-21T01:27:16Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![devsolutionsbr](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/devsolutionsbr/32/62390_2.png) [@devsolutionsbr](https://community.auth0.com/u/devsolutionsbr)\
**Post date:** [November 21, 2024, 1:27am UTC](https://community.auth0.com/t/auth0-android-kotlin-refresh-token/152023/1 "2024-11-21T01:27:16Z")

</div>

Hello guys, I need help with the automatic token update in Android Kotlin. What do I need to do when it expires?

---

<div class="post-metadata">

**Author:** ![Fario\_Consulting](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/fario_consulting/32/60590_2.png) [@Fario\_Consulting](https://community.auth0.com/u/Fario_Consulting)\
**Post date:** [November 22, 2024, 2:15pm UTC](https://community.auth0.com/t/auth0-android-kotlin-refresh-token/152023/2 "2024-11-22T14:15:54Z")

</div>

Hi,  
You can use Auth0’s CredentialsManager to handle it seamlessly.  
If the refresh token is expired or not available (maybe it was revoked), the SDK will automatically prompt the user to log in again

---

<div class="post-metadata">

**Author:** ![devsolutionsbr](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/devsolutionsbr/32/62390_2.png) [@devsolutionsbr](https://community.auth0.com/u/devsolutionsbr)\
**Post date:** [November 22, 2024, 5:16pm UTC](https://community.auth0.com/t/auth0-android-kotlin-refresh-token/152023/3 "2024-11-22T17:16:49Z")

</div>

I need an example repo where the validation and refresh of the token is carried out automatically I need urgent help please

---

<div class="post-metadata">

**Author:** ![marybeth.hunter](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/marybeth.hunter/32/61955_2.png) [@marybeth.hunter](https://community.auth0.com/u/marybeth.hunter)\
**Post date:** [November 22, 2024, 10:21pm UTC](https://community.auth0.com/t/auth0-android-kotlin-refresh-token/152023/5 "2024-11-22T22:21:14Z")

</div>

Hi @devsolutionsbr,

Welcome to the Auth0 Community!

Please see these links that may prove helpful to you:

- [Auth0.Android/EXAMPLES.md at main · auth0/Auth0.Android · GitHub](https://github.com/auth0/Auth0.Android/blob/main/EXAMPLES.md#credentials-manager)
- [Auth0.Android/EXAMPLES.md at main · auth0/Auth0.Android · GitHub](https://github.com/auth0/Auth0.Android/blob/main/EXAMPLES.md#token-validation)
- [Get Started with Android Authentication Using Kotlin - Part 2](https://auth0.com/blog/get-started-with-android-authentication-using-kotlin-part-2/)
- [Auth0.Android Save and Renew Tokens](https://auth0.com/docs/libraries/auth0-android/auth0-android-save-and-renew-tokens#retrieving-credentials)

Thanks,

Mary Beth

---

<div class="post-metadata">

**Author:** ![devsolutionsbr](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/devsolutionsbr/32/62390_2.png) [@devsolutionsbr](https://community.auth0.com/u/devsolutionsbr)\
**Post date:** [November 26, 2024, 8:40pm UTC](https://community.auth0.com/t/auth0-android-kotlin-refresh-token/152023/6 "2024-11-26T20:40:02Z")

</div>

“Ok, excellent, thank you very much. The token is now refreshing, but when I close the app and reopen it, it logs me out.”

“Do you have any repository that implements the entire refresh token functionality?”

---

<div class="post-metadata">

**Author:** ![marybeth.hunter](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/marybeth.hunter/32/61955_2.png) [@marybeth.hunter](https://community.auth0.com/u/marybeth.hunter)\
**Post date:** [December 2, 2024, 3:44pm UTC](https://community.auth0.com/t/auth0-android-kotlin-refresh-token/152023/7 "2024-12-02T15:44:00Z")

</div>

Hi @devsolutionsbr,

I took a look and did not see a repository with a full example. After reviewing the above links, do you have any specific questions I could help answer?

Best,

Mary Beth

---

<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:** [December 16, 2024, 3:44pm UTC](https://community.auth0.com/t/auth0-android-kotlin-refresh-token/152023/8 "2024-12-16T15:44:36Z")

</div>

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