Skip to content
This repository has been archived by the owner on Jun 9, 2024. It is now read-only.

Make it better #1

Open
9 tasks
robotdan opened this issue Jul 3, 2019 · 4 comments
Open
9 tasks

Make it better #1

robotdan opened this issue Jul 3, 2019 · 4 comments
Assignees

Comments

@robotdan
Copy link
Member

robotdan commented Jul 3, 2019

This library needs some work, the code was originally written for an IBM Cloud / Cloud Foundry example, and it has become crufty.

Work items:

  • Update README with a work-able how-to
  • Remove Cloud Foundry / IBM Cloud references
  • Remove need for API key in the React code if being used, it may not be
  • Remove need for public key in the Node code, use JWKS if possible with a JWT library
  • Decide if we want to keep the native JavaScript in the React auth.js module, or use a FusionAuth client library
  • Update node / react deps to be modern
  • Use proper React idioms
  • Update to use a recommended FusionAuth login workflow using HTTP only cookies such as this workflow: https://fusionauth.io/articles/logins/spa/oauth-authorization-code-grant-jwts-refresh-tokens-cookies
  • Optionally code a workflow using the OAuth2 Authorization Code Grant
@robotdan robotdan self-assigned this Jul 3, 2019
@engineertdog
Copy link
Contributor

Currently working on cleaning up the Node server and creating the React client from scratch. Initial commit: 463ccaf. For some reason, the cookies aren't being set, and I can't figure out why. It worked with Angular just fine. I still have a ways to go once I get this cookie issue figured out though. I'll be on/off a bit over the next two weeks while on vacation, but please take a look and let me know what you think, and let me know if you can figure out why the cookies may not be working.

@robotdan
Copy link
Member Author

Re: cookies, make sure you set withCredentials = "true" with whatever you're using to make the HTTP request.

@engineertdog
Copy link
Contributor

Ah, I never saw that anywhere in Angular. I'm not familiar with it at all, so I'm guessing that must have been set somewhere else in that repo, unless it's built into the fetch module used there. I was able to fix the cookie issue. I'll cleanup the code I have so far, add the comments, and then I'll move on to adding the additional content.

@vincentroman
Copy link

@robotdan please add react-redux and redux to it so one can better understand how to add it to a sigle page app the uses redux

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants