Skip to content

RNAppAuth Authorize Not Resolving (IOS) #1089

@ColtraneNadler

Description

@ColtraneNadler

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

    // 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');

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions