FormidableLabs / FormidableLabs/react-native-app-auth

Not Providing sendClientId on revoke leads to successful operation even though it is failing with cognito

Aperta
#774 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub
Lingua principale
Java
Stelle
2.3k
Fork
473
Metriche di merge delle PR
Nessuna PR unita negli ultimi 30g

Descrizione

## 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

Guida per i contributori

Apri la guida per i contributori

Valutazione

Questa issue non è ancora stata valutata.

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.