Description
New Feature / Enhancement Checklist
- I am not disclosing a vulnerability.
- I am not just asking a question.
- I have searched through existing issues.
Current Limitation
When logging in to Parse backend from react-native, we do not get expiration date or expires after or any equivalent information
Feature / Enhancement Description
Include Expiration details of the session token when retrieving the said session after login.
Example Use Case
Consider if the session token is set to 1 hour in the Parse Backend instead of the default 1 year and the user needs to refresh the token before expiration if he needs to continue using the session after said time. When the user logs in from a mobile app (my use case: react-native) and retrieves the current session, along with the current session token, we do not get the expiration details of the said token.
In the client application, if we know the expiration date of the session, we can prompt the user to refresh the token or re-login to get a fresh session token to continue using the app.
Alternatives / Workarounds
In the current implementation, Parse.Session.current() throws an error with Session Expired message instead of letting us validate with getting the current session and check if it is valid.
Developers can place the logic of re-login into catch statement checking error code 209.
3rd Party References
Any OAuth supports token refresh and expires after (in seconds) along with retrieving actual token