Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

I got RNAppAuth.authorize got 13 aurguments, expected 16 #719

Closed
nguyen-tam opened this issue Mar 24, 2022 · 3 comments
Closed

I got RNAppAuth.authorize got 13 aurguments, expected 16 #719

nguyen-tam opened this issue Mar 24, 2022 · 3 comments
Labels
needs-more-info This issue may not have sufficient information for a contributor to take action needs-repro This issue could be improved with a clear list of steps to reproduce the issue

Comments

@nguyen-tam
Copy link

nguyen-tam commented Mar 24, 2022

Issue

I got RNAppAuth.authorize got 13 aurguments, expected 16

Here is the code 👍

const config = {
    clientId: AuthConfig.appId,
    issuer: 'https://login.microsoftonline.com/common',
    redirectUrl: Platform.OS === 'ios' ? 'urn:ietf:wg:oauth:2.0:oob' : 'graph-tutorial://react-native-auth',
    scopes: AuthConfig.appScopes,
    additionalParameters: { prompt: 'select_account' },
    serviceConfiguration: {
      authorizationEndpoint: 'https://login.microsoftonline.com/common/oauth2/v2.0/authorize',
      tokenEndpoint: 'https://login.microsoftonline.com/common/oauth2/v2.0/token',
    },
};  
var result = await authorize(config);

Environment

  • Your Identity Provider: Azure
  • Platform that you're experiencing the issue on: Android
  • Are you using Expo? No
@nguyen-tam nguyen-tam changed the title I got RNAppAuth.refresh got 13 aurguments, expected 14 I got RNAppAuth.authorize got 13 aurguments, expected 14 Mar 24, 2022
@nguyen-tam nguyen-tam changed the title I got RNAppAuth.authorize got 13 aurguments, expected 14 I got RNAppAuth.authorize got 13 aurguments, expected 16 Mar 24, 2022
@Jay-A-McBee
Copy link
Contributor

Jay-A-McBee commented Mar 25, 2022

👋 hey there @nguyen-tam - hmm... what version of this library are you using? 6.4.3? If not, try upgrading to this most recent version.

I tried logging into Azure using our Example app on the Android simulator. I also mirrored your config object. I wasn't able to replicate the error you are seeing.

{
  issuer: 'https://login.microsoftonline.com/common/v2.0/',
  clientId: <CLIENT_ID>,
  redirectUrl: 'example.myapp.com://oauth',
  additionalParameters: { prompt: 'select_account' },
  scopes: ['openid', 'offline_access'],
  serviceConfiguration: {
    authorizationEndpoint: 'https://login.microsoftonline.com/common/oauth2/v2.0/authorize',
    tokenEndpoint: 'https://login.microsoftonline.com/common/oauth2/v2.0/token',
 }
}

azure_login

Let me know if you still see the issue after upgrading 🚀

@Jay-A-McBee Jay-A-McBee added needs-more-info This issue may not have sufficient information for a contributor to take action needs-repro This issue could be improved with a clear list of steps to reproduce the issue labels Mar 25, 2022
@nguyen-tam
Copy link
Author

@Jay-A-McBee Thanks for your reply. It turns out I got this error because I upgraded from 5.1.3 to 6.4.3. Here is how I fixed it.

  1. npm uninstall react-native-app-auth
  2. gradlew clean
  3. npm install --save react-native-app-auth ( install the newest version here)

@Jay-A-McBee
Copy link
Contributor

👍 glad you got it sorted out

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needs-more-info This issue may not have sufficient information for a contributor to take action needs-repro This issue could be improved with a clear list of steps to reproduce the issue
Projects
None yet
Development

No branches or pull requests

2 participants