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

Allow additional options for authorize and support custom LAPolicy #526

Merged
merged 31 commits into from
Jan 31, 2023

Conversation

chrismcleod
Copy link
Contributor

@chrismcleod chrismcleod commented Oct 9, 2022

Changes

  • Fix issue passing other configuration options to authorize call // fixed in a separate PR
  • Fix issue where iOS enableLocalAuthentication uses title parameter for all properties instead of the correct paramters
  • Consume ability to specify LA policy (to fallback to passcode for example)

New usage for custom evaluation policy on iOS:

import {useAuth0, LAPolicy} from 'react-native-auth0'

const { requireLocalAuthentication } = useAuth0()

requireLocalAuthentication(
  'title',
  'description',
  'cancel',
  'fallback',
   LAPolicy.deviceOwnerAuthentication // Biometric or device passcode
);

Testing

  • This change adds unit test coverage
  • This change has been tested on the latest version of the platform/language or why not

What to test

  • Pass different values for title, description, cancel, fallback. Test FaceID on iOS device. See the different titles are used in the system FaceID UI (they were all title before)

  • Pass ephemeralSession: true to the 2nd set of options for authorize call. See iOS does not prompt to login with auth0.

  • Pass LAPolicy.deviceOwnerAuthentication for the new 5th parameter to requireLocalAuthentication. Test that FaceID falls back to device passcode for iOS.

Checklist

@chrismcleod chrismcleod requested a review from a team as a code owner October 9, 2022 21:15
Fix issue passing Other configuration options to authorize call
@chrismcleod chrismcleod changed the title Update auth0-provider.js Allow additional options for authorize and support custom LAPolicy Oct 10, 2022
Fix issue passing Other configuration options to authorize call
@poovamraj
Copy link
Contributor

Hi @chrismcleod thanks a lot for your contribution and this looks like a really neat work. I am discussing with our team about this and will get back to you about this PR soon

@chrismcleod
Copy link
Contributor Author

chrismcleod commented Oct 28, 2022

@poovamraj updated to use #542 for the options param I fixed here.

@ajamthe
Copy link

ajamthe commented Jan 19, 2023

Hey Guys, Is there any update on this ticket. We are also looking for an additional input to control the LAPolicy.

ios/A0Auth0.m Outdated Show resolved Hide resolved
Copy link
Contributor

@Widcket Widcket left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just left a few comments. @poovamraj please make sure to test this manually.

index.js Outdated Show resolved Hide resolved
poovamraj and others added 2 commits January 31, 2023 20:13
Co-authored-by: Rita Zerrizuela <zeta@widcket.com>
Co-authored-by: Rita Zerrizuela <zeta@widcket.com>
Widcket
Widcket previously approved these changes Jan 31, 2023
Copy link
Contributor

@Widcket Widcket left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@poovamraj poovamraj closed this Jan 31, 2023
@poovamraj poovamraj reopened this Jan 31, 2023
poovamraj
poovamraj previously approved these changes Jan 31, 2023
@poovamraj poovamraj dismissed stale reviews from Widcket and themself via 9c4407c January 31, 2023 18:45
@poovamraj poovamraj merged commit da04cb0 into auth0:master Jan 31, 2023
@poovamraj poovamraj mentioned this pull request Feb 1, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants