FormidableLabs / FormidableLabs/react-native-app-auth

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

Offen
#1,104 0 Kommentare 1 Reaktion 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

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

Beitragsleitfaden

Beitragsleitfaden öffnen

Rechercherichtung

Beginne mit authorize(config) unter Verwendung der bereitgestellten react-native-app-auth 8.1.0-Konfiguration und reproduziere den iOS-Ablauf mit iosCustomBrowser auf safari gesetzt und der angegebenen redirectUrl. Vergleiche ihn mit dem funktionierenden In-App-Browser-Ablauf; abgeschlossen ist es, wenn eine erfolgreiche Safari-Weiterleitung Autorisierungstoken zurückgibt und der Token-Austausch stattfindet.

Vom Indexierungsmodell aus dem Issue-Text verfasst.

Bewertung

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

Neue Issues direkt in Ihr Postfach

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