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

Incorrect parameters to authorize in docs #700

Closed
6 tasks done
objectiveSee opened this issue Aug 15, 2023 · 12 comments
Closed
6 tasks done

Incorrect parameters to authorize in docs #700

objectiveSee opened this issue Aug 15, 2023 · 12 comments
Labels
bug This points to a verified bug in the code

Comments

@objectiveSee
Copy link

Checklist

Description

In README, the example you have provided for using authorize() is not correct. There are two required parameters which cannot be omited in Typescript.

https://github.com/auth0/react-native-auth0/blob/master/README.md?plain=1#L280

The correct usage would be:

authorize({},{})

Empty objects must be passed because parameters and options are not optional.

Solution: Update docs. Or, update authorize to take a single object with optional parameters such as:

Change this:

  authorize: (
    parameters: WebAuthorizeParameters,
    options: WebAuthorizeOptions
  ) => Promise<Credentials | undefined>;

to this:

  authorize: ({
        parameters?: WebAuthorizeParameters,
        options?: WebAuthorizeOptions
    }
  ) => Promise<Credentials | undefined>;

Reproduction

See README

Additional context

No response

react-native-auth0 version

3.0.0

React Native version

72.3

Expo version

49

Platform

Android, iOS

Platform version(s)

any

@objectiveSee objectiveSee added the bug This points to a verified bug in the code label Aug 15, 2023
@objectiveSee
Copy link
Author

objectiveSee commented Aug 15, 2023

clearSession has the same bug in docs: https://github.com/auth0/react-native-auth0#logout

@felipem292
Copy link

hi do you know why login did not redirect in android when logins was Successful?

@poovamraj
Copy link
Contributor

@objectiveSee thanks a lot for raising this. We will make the API cleaner to use.

@poovamraj
Copy link
Contributor

@felipem292 can you create a seperate issue with more details?

@poovamraj
Copy link
Contributor

@objectiveSee thanks for reporting this. We have fixed this in this PR - #701

Please check it out and let us know your feedback. We will close this issue to continue the conversation in the PR.

@ysheep-js
Copy link

ysheep-js commented Aug 16, 2023

hi do you know why login did not redirect in android when logins was Successful?

Same issue here, is there any feedback?

@poovamraj
Copy link
Contributor

@ysheep-js we would require more details. Can you create a seperate Github issue with more details asked in the issues template.

@ysheep-js
Copy link

@ysheep-js we would require more details. Can you create a seperate Github issue with more details asked in the issues template.

Ok, I'll create a new one, thanks.

@poovamraj
Copy link
Contributor

@ysheep-js @felipem292 Did you follow the migration guide on updating the callback URL?

@ysheep-js
Copy link

@ysheep-js @felipem292 Did you follow the migration guide on updating the callback URL?

Yes, I have added .auth0 suffix

@poovamraj
Copy link
Contributor

@ysheep-js It would be helpful if you can share the code snippet, a screen recording, whether this issue is happening only in version 3.0.0 and more details we would be happy to help. Please create a seperate GH issue to make it easier to track

@felipem292
Copy link

felipem292 commented Aug 16, 2023

i'm using "react-native-auth0": "^2.17.4"
IOS is working perfect

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug This points to a verified bug in the code
Projects
None yet
Development

No branches or pull requests

4 participants