FormidableLabs / FormidableLabs/react-native-app-auth

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

Offen
#774 0 Kommentare 0 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen
Vorherrschende Sprache
Java
Sterne
2.3k
Forks
473
PR-Merge-Kennzahlen
Keine gemergten PRs in 30 T.

Beschreibung

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

Beitragsleitfaden

Beitragsleitfaden öffnen

Rechercherichtung

Es werden keine Implementierungsdateien oder Tests genannt. Beginne damit, den Android-Widerrufspfad nachzuverfolgen und das Cognito-Beispiel zu überprüfen; verifiziere, wie eine Widerrufsanfrage ohne sendClientId gemeldet wird und ob das Beispiel den Parameter dokumentiert. Erledigt ist die Aufgabe, wenn die fehlgeschlagene Widerrufung konsistent sichtbar gemacht wird und das Beispiel die erforderliche Konfiguration widerspiegelt.

Vom Indexierungsmodell aus dem Issue-Text verfasst.

Bewertung

Tech-Stack
android, react-native
Bereich
authentication, mobile
Issue-Typ
Bug
Schwierigkeit
3/5
Geschätzter Aufwand
1-2 Tage
Aktivitätsstatus
Veraltet
Klarheit
Größtenteils klar
Anfängerfreundlichkeit
45/100

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.