FormidableLabs / FormidableLabs/react-native-app-auth
Not Providing sendClientId on revoke leads to successful operation even though it is failing with cognito
- Langage dominant
- Java
- Étoiles
- 2.3k
- Forks
- 473
- Métriques de merge des PR
- Aucune PR mergée en 30 j
Description
## Issue
Hi, this is the first time, I report anything to an open source project. So I hope, I am doing it alright ^__^
When revoking a token for Cognito, it is not required to use the `sendClientId: true`-parameter. However, when failing to do so on android (I did not test it for iOS), the operation is still successful, but the token is not revoked. The expected behavior from my point of view would be that the operation fails and an error is thrown, when the token is not revoked, because of the missing parameter.
Furthermore, I noticed that the parameter is also missing in the cognito example, should it be added there?
The problem can be reproduced like this:
```js
import {authorize, refresh, revoke} from 'react-native-app-auth';
revoke(config, {tokenToRevoke: auth.refreshToken})
.then(() => {
console.log('success');
//This should not be reached, while the token is still valid
refresh(config, {
refreshToken: auth.refreshToken,
}).catch(err => {
console.log(err);
});
})
.catch(err => {
console.log(err);
console.log('fail');
});
```
Could you verify, if this is only a problem on my end or a general one? If you need more input, don't hesitate to ask =)
## Environment
* **Your Identity Provider**: `Cognito`
* **Platform that you're experiencing the issue on**: `Android`
* **Are you using Expo?** - No
Guide de contribution
Ouvrir le guide de contribution
Piste de recherche
Aucun fichier d’implémentation ni test n’est indiqué. Commencez par suivre le chemin de révocation Android et examiner l’exemple Cognito ; vérifiez comment une requête de révocation sans sendClientId est signalée et si l’exemple documente le paramètre. Le travail est terminé lorsque l’échec de la révocation est remonté de manière cohérente et que l’exemple reflète la configuration requise.
Rédigé par le modèle d'indexation à partir du texte de l'issue.
Évaluation
- Stack technique
- android, react-native
- Domaine
- authentication, mobile
- Type d'issue
- Bug
- Difficulté
- 3/5
- Temps estimé
- 1-2 jours
- Activité
- À l'abandon
- Clarté
- Plutôt claire
- Accessibilité débutants
- 45/100