FormidableLabs / FormidableLabs/react-native-app-auth

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

オープン
#774 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

まだ誰も着手していません。

主要言語
Java
スター
2.3k
フォーク
473
PR マージ指標
30日以内にマージされた PR はありません

説明

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:

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

コントリビューションガイド

コントリビューションガイドを開く

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

調査の方向性

実装ファイルやテストは指定されていません。まず Android の revoke path を追跡し、Cognito の例を確認してください。sendClientId なしの revoke request がどのように報告されるか、また例でそのパラメーターがドキュメント化されているかを確認します。失敗した revoke が一貫して表面化され、例が必要な設定を反映していれば完了です。

索引モデルが issue の本文から書いたものです。

評価

技術スタック
android, react-native
領域
authentication, mobile
issue の種類
バグ
難易度
3/5
見積もり時間
1〜2日
活発さ
停滞
明瞭さ
おおむね明確
初心者へのやさしさ
45/100

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。