FormidableLabs / FormidableLabs/react-native-app-auth

RNAppAuth Authorize Not Resolving (IOS)

Abierto
#1,089 2 comentarios 0 reacciones 0 asignados Ver en GitHub
Lenguaje dominante
Java
Estrellas
2.3k
Forks
473
Métricas de merge de PR
Sin PR fusionados en 30 d

Descripción

## 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,
};
}
```

Guía de contribución

Abrir la guía de contribución

Línea de trabajo

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.

Escrito por el modelo de indexación a partir del texto del issue.

Evaluación

Stack tecnológico
ios, react-native, typescript
Área
authentication, mobile
Tipo de issue
Error
Dificultad
3/5
Tiempo estimado
1-2 días
Estado de actividad
Tranquilo
Claridad
Bastante claro
Aptitud para principiantes
48/100

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.