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

aws-amplify-react-native - withOAuth HOC - Loading State #3021

Closed
jessedoyle opened this issue Apr 5, 2019 · 1 comment · Fixed by #3024
Closed

aws-amplify-react-native - withOAuth HOC - Loading State #3021

jessedoyle opened this issue Apr 5, 2019 · 1 comment · Fixed by #3024
Labels
Auth Related to Auth components/category feature-request Request a new feature needs-discussion Used for internal discussions

Comments

@jessedoyle
Copy link
Contributor

jessedoyle commented Apr 5, 2019

Is your feature request related to a problem? Please describe.
We've implemented a custom OAuth provider login in our react native application with the functionality introduced in #2665 and it's working great!

One issue we've noticed is that it's difficult to render a "loading" state when using the withOAuth HOC as there is no ideal state field to query to determine if amplify is loading the user session.

We'd like to be able to render an animation to our users so that it's clear that the application state is loading.

Describe the solution you'd like
Ideally, a loading prop that defaults to true could be passed down to the wrapped component in withOAuth here.

Describe alternatives you've considered
I haven't considered alternatives, but I'd be open to suggestions.

Additional context
N/A

I'd be happy to submit a PR to implement this functionality - it should be pretty straightforward! (PR: #3024)

@jessedoyle jessedoyle changed the title was-amplify-react-native - withOAuth HOC - Loading State aws-amplify-react-native - withOAuth HOC - Loading State Apr 5, 2019
jessedoyle pushed a commit to jessedoyle/amplify-js that referenced this issue Apr 5, 2019
* Add a `loading` prop to the `withOAuth` higher order component
  that defaults to `true`.
* Once the amplify session has been created, the `loading` prop
  is set to `false`.
* This allows wrapped components to make decisions and display
  animations to users when the HOC is loading.
* Resolves aws-amplify#3021
jessedoyle pushed a commit to jessedoyle/amplify-js that referenced this issue Apr 5, 2019
* Add a `loading` prop to the `withOAuth` higher order component
  that defaults to `true`.
* Once the amplify session has been created, the `loading` prop
  is set to `false`.
* This allows wrapped components to make decisions and display
  animations to users when the HOC is loading.
* Resolves aws-amplify#3021
jessedoyle pushed a commit to jessedoyle/amplify-js that referenced this issue Apr 6, 2019
* Add a `loading` prop to the `withOAuth` higher order component
  that defaults to `true`.
* Once the amplify session has been created, the `loading` prop
  is set to `false`.
* This allows wrapped components to make decisions and display
  animations to users when the HOC is loading.
* Resolves aws-amplify#3021
@elorzafe elorzafe added Auth Related to Auth components/category feature-request Request a new feature needs-discussion Used for internal discussions labels Apr 8, 2019
jessedoyle pushed a commit to jessedoyle/amplify-js that referenced this issue Apr 8, 2019
*  Add a `loading` prop to the `withOAuth` higher order component
  that defaults to `true`.
* Once the amplify session has been created, the `loading` prop
  is set to `false`.
* This allows wrapped components to make decisions and display
  animations to users when the HOC is loading.
* Resolves aws-amplify#3021
jessedoyle pushed a commit to jessedoyle/amplify-js that referenced this issue May 6, 2019
*  Add a `loading` prop to the `withOAuth` higher order component
  that defaults to `true`.
* Once the amplify session has been created, the `loading` prop
  is set to `false`.
* This allows wrapped components to make decisions and display
  animations to users when the HOC is loading.
* Resolves aws-amplify#3021
jessedoyle pushed a commit to jessedoyle/amplify-js that referenced this issue May 10, 2019
*  Add a `loading` prop to the `withOAuth` higher order component
  that defaults to `false`.
* Once the component is mounted, set the loading state to true.
* Once the amplify session has been created, the `loading` prop
  is set to `false`.
* This allows wrapped components to make decisions and display
  animations to users when the HOC is loading.
* Resolves aws-amplify#3021
jordanranz added a commit to jessedoyle/amplify-js that referenced this issue May 13, 2019
jordanranz added a commit that referenced this issue May 13, 2019
feat(aws-amplify-react-native): withOAuth Loading
@github-actions
Copy link

This issue 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 12, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Auth Related to Auth components/category feature-request Request a new feature needs-discussion Used for internal discussions
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants