FormidableLabs / FormidableLabs/react-native-app-auth
Authorize()'s refreshToken expiry
- Lingua principale
- Java
- Stelle
- 2.3k
- Fork
- 473
- Metriche di merge delle PR
- Nessuna PR unita negli ultimi 30g
Descrizione
## 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
Guida per i contributori
Apri la guida per i contributori
Direzione di ricerca
Inizia con l’uso dell’autorizzazione e del refresh descritto nella documentazione collegata e riproduci il problema su Android con Azure usando le chiamate fornite authorize() e refresh(). Confronta i campi del token restituito e il comportamento in caso di errore dopo la scadenza dell’access-token; il lavoro è concluso quando viene spiegato se la scadenza del refresh-token è esposta e perché la chiamata refresh() fallisce.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Valutazione
- Stack tecnologico
- android, azure, react-native
- Ambito
- authentication, mobile
- Tipo di issue
- Bug
- Difficoltà
- 4/5
- Tempo stimato
- 3-5 giorni
- Stato di attività
- Ferma
- Chiarezza
- Abbastanza chiara
- Idoneità per principianti
- 30/100