FormidableLabs / FormidableLabs/react-native-app-auth

When using iosCustomBrowser after a redirect it does not return authorization tokens

オープン
#1,104 コメント 0 件 リアクション 1 件 担当者 0 名 GitHub で見る
主要言語
Java
スター
2.3k
フォーク
473
PR マージ指標
30日以内にマージされた PR はありません

説明

## Issue

If I remove iosCustomBrowser from the config file, authorization occurs within the app in a drop-down WebView. But this option doesn't suit me. I want to use the login and password saving feature provided by iosCustomBrowser: 'safari'. When the user is redirected to a separate browser window, after successful authorization, I'm returned to the app, and the result doesn't produce any logs or anything. In the inspector, I don't see a URL that ends in protocol/openid-connect/token with the POST method. As soon as I remove iosCustomBrowser: 'safari', everything starts working again. I'm looking for a way to save the login and password. If you have an alternative solution, I'd be glad to see it. Thanks.

---

## Environment

I updated react-native-app-auth to version 8.1.0

I'm using the following config

const config: AuthConfiguration = {
iosCustomBrowser: 'safari',
iosPrefersEphemeralSession: true,
redirectUrl: redirectUrl,
androidAllowCustomBrowsers: ['chrome'],
additionalParameters: {
prompt: 'login',
},
androidTrustedWebActivity: true,
clientId: clientId,
issuer: issuerUri,
scopes: ['openid', 'profile'],
usePKCE: true,
skipCodeExchange: false,
};

I'm using the authorization method
const result = await authorize(config);

Keycloak type auth

IOS device

"react-native-app-auth": "8.1.0",
"react-native": "0.76.0",

I'm not used expo

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

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

調査の方向性

提供された react-native-app-auth 8.1.0 の設定を使用して authorize(config) から始め、iosCustomBrowser を safari に設定し、記載された redirectUrl を使用して iOS フローを再現します。動作しているアプリ内ブラウザフローと比較します。完了条件は、Safari によるリダイレクトが成功して認証トークンを返し、トークン交換が行われることです。

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

評価

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

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

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