FormidableLabs / FormidableLabs/react-native-app-auth
RNAppAuth Authorize Not Resolving (IOS)
- Dominant language
- Java
- Stars
- 2.3k
- Forks
- 473
- PR merge metrics
- No merged PRs in 30d
Description
## 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,
};
}
```
Contributor guide
Assessment
This issue has not been assessed yet.