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

Add a React Web Example #153

Closed
KevinDanikowski opened this issue Aug 26, 2020 · 3 comments · May be fixed by weave-lab/AppAuth-JS#1, weave-lab/AppAuth-JS#2 or weave-lab/AppAuth-JS#3
Closed

Add a React Web Example #153

KevinDanikowski opened this issue Aug 26, 2020 · 3 comments · May be fixed by weave-lab/AppAuth-JS#1, weave-lab/AppAuth-JS#2 or weave-lab/AppAuth-JS#3

Comments

@KevinDanikowski
Copy link

KevinDanikowski commented Aug 26, 2020

Documentation Desired

Working example of react with appauth-JS

There is a web example of appauth-js, however there is not a web example using the popular react framework (not react-native to clarify). There is a sufficient example with a nodeJS server and electron, however the request handler for a web application must be different. It would be appreciated to have a react example (preferably with some sort of auth hook).

Reference to a POC of a working React Example

I've made a POC with create-react-app, It's located here (https://github.com/KevinDanikowski/appauth-js-react-sample) and I would have no problem with this code being taken and hosted somewhere aside from my local repo, or even referencing my repo is fine. I would prefer to have an auth hook to be used by other components, I may be adding that in the coming days.

@tikurahul
Copy link
Collaborator

FWIW, there is a simple sample app here: https://github.com/openid/AppAuth-JS/blob/master/app/index.html

@KevinDanikowski
Copy link
Author

@tikurahul correct, I used it to create the react one, however it doesn't return callbacks in the auth flow constructor and it isn't the same as the flow in react, and thus I believe there should be an example for react (not to mention I really wanted to see one so I didn't have to figure it out myself! haha).

@tikurahul
Copy link
Collaborator

👍🏼

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment