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

[SDK-3537] Credential manager for React Native #501

Merged
merged 19 commits into from
Aug 18, 2022
Merged

Conversation

poovamraj
Copy link
Contributor

@poovamraj poovamraj commented Aug 15, 2022

Changes

We have provided Credentials Manager support for Android and iOS in React Native. The following methods are added

  • getCredentials
  • saveCredentials
  • hasValidCredentials
  • clearCredentials

We also return a boolean value from Android API for clearCredentials. This is to be same to our iOS API and Flutter API

This PR is a superset of #497 and will have all the changes and reviews from there implemented.

References

#476

Testing

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

Checklist

@poovamraj poovamraj requested a review from a team as a code owner August 15, 2022 09:18
@poovamraj poovamraj changed the title Credential manager ios [SDK-3537] Credential manager ios Aug 15, 2022
@poovamraj poovamraj changed the title [SDK-3537] Credential manager ios [SDK-3537] Credential manager iOS Aug 15, 2022
@poovamraj poovamraj changed the title [SDK-3537] Credential manager iOS [SDK-3537] Credential manager for React Native Aug 15, 2022
@stevehobbsdev
Copy link
Contributor

👋🏻 Should this be going into master, or vnext?

Copy link
Contributor

@stevehobbsdev stevehobbsdev left a comment

Choose a reason for hiding this comment

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

LGTM, just left a few comments.

Also we should get @Widcket to review the iOS implementation, if she hasn't had a look already.

src/credentials-manager/index.js Outdated Show resolved Hide resolved
src/credentials-manager/index.js Show resolved Hide resolved
@poovamraj poovamraj changed the base branch from master to vnext August 17, 2022 10:01
Comment on lines 5 to 10
/**
* Construct an instance of CredentialsManager which can be used to
* store, retrieve and manage credentials.
*
* @param {*} auth - required - instance of Auth0 Auth API
*/
Copy link
Contributor

Choose a reason for hiding this comment

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

I think this is an improvement but we should document the actual fields like we've done for other methods (saveCredentials, for example).

instance of Auth0 Auth API

Is this correct? Why do we require the whole instance of the Auth API, only to extract domain and clientId and then not use the instance?

@poovamraj poovamraj requested a review from Widcket August 17, 2022 11:52
@stevehobbsdev stevehobbsdev self-requested a review August 17, 2022 11:52
stevehobbsdev
stevehobbsdev previously approved these changes Aug 17, 2022
ios/A0Auth0.m Outdated Show resolved Hide resolved
@poovamraj poovamraj requested a review from Widcket August 18, 2022 04:30
@poovamraj poovamraj enabled auto-merge (squash) August 18, 2022 06:27
@poovamraj poovamraj merged commit 6b0ca9e into vnext Aug 18, 2022
@poovamraj poovamraj deleted the credential-manager-ios branch August 18, 2022 09:41
@poovamraj poovamraj mentioned this pull request Sep 9, 2022
@poovamraj poovamraj mentioned this pull request Oct 7, 2022
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.

3 participants