FormidableLabs / FormidableLabs/react-native-app-auth
Authorize()'s refreshToken expiry
- Vorherrschende Sprache
- Java
- Sterne
- 2.3k
- Forks
- 473
- PR-Merge-Kennzahlen
- Keine gemergten PRs in 30 T.
Beschreibung
## Issue
Hi, I've read the documentation for authorization function of this library (https://commerce.nearform.com/open-source/react-native-app-auth/docs/usage/authorization).
The response contains the expiration only for the accessToken and not for the refreshToken. Can you tell how much time does the refreshToken has before it expires as well?
I am asking because currently I am in a situation that I need the refreshToken from authorize(config) to be used on refresh() like the next code snippet for my Azure Active Directory login.
`// Refresh token`
`const refreshedState = await refresh(config, {
refreshToken: authState.refreshToken,
});`
But the problem is, when I use the `authState.refreshToken` when the `authState.accessToken` from authorize(config) has expired, refresh(config) fails. But as long as the `authState.accessToken` is not yet expired, the refresh(config) call returns a successful response.
I'm thinking if the `authState.refreshToken` is being expired the same time as `authState.accessToken`. Because refresh(config) fails only when the `authState.accessToken` has expired.
---
## Environment
* **Your Identity Provider**: Azure
* **Platform that you're experiencing the issue on**: Tested on Android only yet
* **Your `react-native` Version**: 0.69.2
* **Your `react-native-app-auth` Version**: 6.0.2
* **Are you using Expo?** No
Beitragsleitfaden
Rechercherichtung
Beginne mit der in der verlinkten Dokumentation beschriebenen Verwendung von Autorisierung und Refresh und reproduziere das Problem auf Android mit Azure unter Verwendung der bereitgestellten Aufrufe authorize() und refresh(). Vergleiche die zurückgegebenen Token-Felder und das Fehlerverhalten nach Ablauf des access-token; abgeschlossen ist die Untersuchung, wenn erklärt wird, ob der Ablauf des refresh-token offengelegt wird und warum der Aufruf refresh() fehlschlägt.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Bewertung
- Tech-Stack
- android, azure, react-native
- Bereich
- authentication, mobile
- Issue-Typ
- Bug
- Schwierigkeit
- 4/5
- Geschätzter Aufwand
- 3-5 Tage
- Aktivitätsstatus
- Veraltet
- Klarheit
- Größtenteils klar
- Anfängerfreundlichkeit
- 30/100