How do we know if credentials have expired and how often do they need refreshing ?

This is in reference to https://docs.expo.io/versions/latest/guides/push-notifications

An access token expires in one hour while the refresh token will be valid until revoked by the user. However, you should never rely on these times and instead be prepared to catch an exception whenever credentials are no longer valid, and react accordingly.

Check the documentation for the description on the complete flow, together with sample code implementing it: API-specific authorization and authentication information  |  Drive API  |  Google Developers

answer source: android - How to check GoogleCredential if it is expired - Stack Overflow

I was referring to push notifications. Does this mean my users won’t get notifications until I wake up and run a specific expo.io command? :thinking:

what credentials exactly are you referring to ?

  • ExpoPushToken - unique and valid through out the installation, user has to uninstall your app to have this token invalidated

  • APN/FCM/GCM credentials - valid until you revoke them from respective web console

There is no other token or such to have push notifications work, please do correct me if I am wrong

If you are using push notification certificates you can check in you developer account when they will expire(and I’m guessing that you will get email reminder before this will happen). If you are using push notification keys they should be valid until revoked.

Thanks for this information.

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