FormidableLabs / FormidableLabs/react-native-app-auth

RNAppAuth Authorize Not Resolving (IOS)

Aperta
#1,089 2 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

While trying to authenticate with Spotify, the `authorize` method is not resolving.
The app linking seems to be working, as I can open the app via
`Linking.openURL('appbundle://oauth?ping=1');` and this works fine in xcode.

---

## Environment
```ts
// versions
"react-native": "0.81.0",
"react-native-app-auth": "^8.0.3",
```

* Spotify oAuth
* IOS
* Not using EXPO

Code
It logs `[DEBUG] Preparing authorization`
It opens the browser, I authorize, the browser closes... but it does not resolve the promise.
The redirect URI is correct. As I was able to test linking above with `Linking.openURL('appbundle://oauth?ping=1');`

```ts
export async function loginSpotify() {
console.log('[DEBUG] Preparing authorization')
const res: AuthorizeResult = await authorize(pkceConfig);
console.log('[DEBUG] Authorized:', res);
return {
accessToken: res.accessToken,
refreshToken: res.refreshToken,
accessTokenExpirationDate: res.accessTokenExpirationDate,
};
}
```

Guida per i contributori

Apri la guida per i contributori

Direzione di ricerca

Start at the authorize(pkceConfig) call in loginSpotify and reproduce the Spotify OAuth flow on iOS with the listed React Native and react-native-app-auth versions. Check the redirect behavior alongside the reported Linking.openURL test. Done means the authorize promise resolves after browser authorization and returns the access and refresh token fields shown in the example.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Valutazione

Stack tecnologico
ios, react-native, typescript
Ambito
authentication, mobile
Tipo di issue
Bug
Difficoltà
3/5
Tempo stimato
1-2 giorni
Stato di attività
Tranquilla
Chiarezza
Abbastanza chiara
Idoneità per principianti
48/100

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.