Skip to content

Conversation

@iishiishii
Copy link
Collaborator

  • Dockerize frontend, backend, database
  • Improve UI to handle niimath operations and download data
  • Create endpoints to authenticate users and handle scene processing
  • Handle data migration with alembic

…PI. Implemented API query in client side.
…h validation and dynamic URL generation.

- Added scene creation endpoint that combines file upload and scene creation.
- Updated models to allow optional fields for tool name and nv_document.
- Mounted static files for serving uploaded uploads.
- Config JupyterHub for authentication.
- create Dockerfile for the frontend to build and serve the application using Nginx.
- Added a build-and-copy script to manage asset copying from the frontend to the backend.
- Created root and home routes for the application.
…nstructions; add prestart script for database setup; update mechanism to logout when access token expires
@pwighton
Copy link
Collaborator

pwighton commented Sep 9, 2025

@iishiishii, I'm having a bit of trouble running this PR.

What I've done:

  • Signed up for workos
  • Edited .env and set WORKOS_CLIENT_ID and WORKOS_API_KEY accordingly
  • Run docker compose watch
  • Browsed to http://localhost:5173/auth

I then tried to sign up using [email protected] but when I click 'create account', nothing seems to happen and I don't see any info in the console. I'm getting some warnings that "input elements don't have autocomplete attributes" but I'm guessing that is unrelated.

singup

I also tried to sign in with the superuser defined in .env ([email protected]/testuserpassword) and when I click 'sign in', I get a validation error

singin

Am I missing a step? If not, can you think of anything I could try to debug?

@neurolabusc, @cdrake, @hanayik, is this working for you? Is this just a peculiarity of my setup (Ubuntu 20.04)?

@iishiishii
Copy link
Collaborator Author

iishiishii commented Sep 10, 2025

Hey @pwighton thanks for testing the PR. Do you have node_modules dir in ./frontend before running with docker? If so can you delete it and try again?

I suspect it might cause workos to fail.

I should have used .dockerignore so the local node modules wouldn't be copied into the container.

@pwighton
Copy link
Collaborator

Thanks @iishiishii, that gets me a bit further.

There was indeed a frontend/node_modules directory, and after deleting that and rebuilding the frontend container, the sign-in tab gives an 'invalid credeitials' message when signing in with the default super user.

singin-atfer-removing-node-modules

But the behavior of the sing-up tab hasn't changed. There is no reponse when I click 'Create Account'

Is there something I need to do on the workOS site? Configure AuthKit perhaps?

@iishiishii
Copy link
Collaborator Author

Thanks for pointing that out! You’re right, the frontend URL needs to be configured in WorkOS. I’ve updated the documentation with the steps here: WorkOS setup instructions

Once that’s set up, you should be able to sign up. WorkOS will handle the email and password for your account, while only the WorkOS user ID gets stored in the local Postgres database.

For testing, I had set up the [email protected] account manually through my own WorkOS project, but that relies on my client ID and key—so it only works in the deployed app. For your own setup, following the updated steps should get things working on your side but let me know if it still doesn't.

@pwighton
Copy link
Collaborator

Thanks @iishiishii! More progress has been made, but I'm still having issues.

When Trying to follow the Work OS setup instructions, I got a message saying I had to enable AuthKit first.

So to do that, I:

  • Navigated to https://dashboard.workos.com/get-started
  • clicked 'Set up AuthKit'
  • selected 'Email + Password', and left all other options ('Single Sign-On', 'GitHub OAuth', etc) de-selected
  • selected 'Build your own UI from scratch.'
  • clicked 'Begin Setup'
  • Under "1) Integrate your application", clicked 'continue'
  • Under "2) Add default redirect endpoint URI", clicked 'Skip this step'
  • Under "3) Complete your integration", clicked 'activate Authkit'

I then followed the Work OS setup instructions:

  • From the sidebar, click 'Authentication' -> 'Sessions'
  • Under 'Cross-Origin Resource Sharing (CORS)', click 'Manage'
  • Enter http://localhost:5173, and click Add.
  • Click "Save Changes"

Now my CORS allowed origins looks like:

workos-cors

And My email+password settings looks like:

workos-email-password

One thing I did notice, is my password was shorter than the length required. So when using my original 8 char password, I get the same behavior (no reponse, no meesage in the console) but when I enter a longer password, I get this:

singin-longerpassword

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants