danilobuerger / redux-implicit-oauth2

OAuth 2.0 Implicit Grant Flow with Redux
MIT License
30 stars 20 forks source link

Property in store to mark as "authentication in progress" #6

Closed bcongdon closed 7 years ago

bcongdon commented 7 years ago

There's currently no way to tell by the state of the store if authentication is in progress.

You can infer by 'isLoggedIn' and 'error', but this leaves discrepancies. For example, if you fail an authentication and then fail again, there's no way to tell when the second failure has occurred.

danilobuerger commented 7 years ago

Hi, @bcongdon. Thank you for the PR, I really appreciate it. Please change isAuthenticating to isLoggingIn. The reasoning behind this: With OAuth2 we are not really authenticating but authorizing. I didn't want to expose this terminology to the user of this library before, so isLoggingIn seems like a better fit.

Also, please set this state on all actions (i.e. LOGOUT).

bcongdon commented 7 years ago

Ah, good idea. isLoggingIn sounds like a better property name. I updated the PR with these changes.

danilobuerger commented 7 years ago

I actually wanted to write that in the PR not the issue 😂. Thanks again! Fixed by #8.