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

Ml/react native #200

Merged
merged 52 commits into from
Jan 30, 2018
Merged

Ml/react native #200

merged 52 commits into from
Jan 30, 2018

Conversation

mlabieniec
Copy link
Contributor

@mlabieniec mlabieniec commented Jan 29, 2018

This PR addresses many duplications of code across aws-amplify-react-native and aws-amplify. The core logic around Authentication, including persistence is now located within aws-amplify and included in aws-amplify-react-native. This also contains updates to the amazon-cognito-identity-js to utilize crypo libraries without the need of the requirement of the aws-sdk. All core logic now resides in aws-amplify, with a new Platform check on the navigator.product to determine if running in React Native (see: facebook/react-native#1331).

  • Auth persistence in React Native, Fixes How do I save Auth state in phone? #193

    some logic from PR Auth state persistence #109

  • Remove redundancies in react-native package
  • Move core logic to aws-amplify
  • Add check for React native in core
  • Update auth to work with async storage if react native
  • Add support for crypto without aws-sdk in cognito lib

@codecov-io
Copy link

codecov-io commented Jan 29, 2018

Codecov Report

Merging #200 into master will decrease coverage by 1.31%.
The diff coverage is 50.64%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #200      +/-   ##
==========================================
- Coverage   92.24%   90.92%   -1.32%     
==========================================
  Files          52       53       +1     
  Lines        2424     2480      +56     
  Branches      486      501      +15     
==========================================
+ Hits         2236     2255      +19     
- Misses        179      215      +36     
- Partials        9       10       +1
Impacted Files Coverage Δ
...ges/aws-amplify/src/Common/Logger/ConsoleLogger.ts 81.25% <ø> (-0.39%) ⬇️
...kages/aws-amplify/src/Cache/BrowserStorageCache.ts 93.56% <100%> (+0.03%) ⬆️
packages/aws-amplify/src/Cache/InMemoryCache.ts 94.65% <100%> (+0.04%) ⬆️
packages/aws-amplify/src/Auth/Auth.ts 90.28% <44.64%> (-7.75%) ⬇️
packages/aws-amplify/src/Common/index.ts 83.33% <50%> (+0.98%) ⬆️
packages/aws-amplify/src/API/RestClient.ts 90.32% <60%> (-2.79%) ⬇️
packages/aws-amplify/src/Common/Platform/index.ts 69.23% <66.66%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update eab355c...93fdbc9. Read the comment docs.

@powerful23
Copy link
Contributor

When calling API.get(), An error saying "Refused to set unsafe header "User-Agent" which may be caused by RestClient.ts line 79

Copy link
Contributor

@richardzcode richardzcode left a comment

Choose a reason for hiding this comment

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

Looks good!

Copy link
Contributor

@powerful23 powerful23 left a comment

Choose a reason for hiding this comment

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

👍

@mlabieniec mlabieniec merged commit e1eb0ab into aws-amplify:master Jan 30, 2018
aws-amplify automation moved this from Backlog to Released Jan 30, 2018
rasfra pushed a commit to epidemicsound/amplify-js that referenced this pull request Mar 11, 2020
* add cognito js lib and update references

* update cognito lib

* update node version and package deps

* update cognito sdk and auth test

* update with yarn workspaces and modules

* add lint to test

* update test cmd

* update build cmds

* update concurrency with bootstrap

* update deps, yarn should use local

* add build before test for workspaces

* remove package-lock.json

* update rn package

* update deps on react native

* update user attributes

* update docs

* core change

* Update package.json

* Adds a podspec for CocoaPods support

* update docs with cli instructions

* update quick start

* update crypto lib for react native and polyfill methods

* move core logic to aws-amplify

* updates for platform detection

* fixes for auth persistence

* update user agent in RestClient to use Platform

* update readme for PR aws-amplify#201

* only set user-agent on API calls in RN

* Remove unused JS call for verifiedContact
@github-actions
Copy link

This pull request has been automatically locked since there hasn't been any recent activity after it was closed. Please open a new issue for related bugs.

Looking for a help forum? We recommend joining the Amplify Community Discord server *-help channels or Discussions for those types of questions.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jun 13, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
No open projects
aws-amplify
  
@beta
Development

Successfully merging this pull request may close these issues.

None yet

4 participants