authsio / core

And idea that never worked but was fun while it lasted
https://authsio.com
GNU Affero General Public License v3.0
12 stars 6 forks source link

Connect front-end to the back-end #24

Closed cedpoilly closed 2 years ago

cedpoilly commented 2 years ago

Work in progress. You can see a demo of the user registration. @hkd987 Seems like we can register multiple times with the same email address. Am I missing something?

hkd987 commented 2 years ago

I think I know where the bug is, I’ll get a fix up for that issue.

hkd987 commented 2 years ago

I noticed that you are adding register logic, but this seems like it should be included in the iframe and then the frontend should bring in the iframe.

cedpoilly commented 2 years ago

I noticed that you are adding register logic, but this seems like it should be included in the iframe and then the frontend should bring in the iframe.

Should we have the iframe logic in the Front-End folder directly?

hkd987 commented 2 years ago

I think the frame should have its own logic, and be self contained.

Remember that the iframe will be a drop in not only for our website but for others login UIs

cedpoilly commented 2 years ago

Right. I misread you earlier. I'll move that logic to the iframe folder. Then I'll add the code for the Front-End folder

cedpoilly commented 2 years ago

@hkd987 @evanyang1 You can test the register and login features by starting a static server in the /iframe folder

cedpoilly commented 2 years ago

@hkd987 Here is the current workflow:

  1. Start the back-end, start the front-end and start a static server for the iframe
  2. Login via the iframe -> you will be redirected to localhost:3000 and the x-api-key and jwt will be set in the localStorage. Then the dashboard will be loaded.
  3. Create, update and delete the projects.