I’m trying to create an open source example of building a streamlit Shopify App.
Question: If I deploy streamlit and flask on 2 separate services using docker-compose (like here) and I can authenticate a user through the flask service (like here). How can I securely direct the user from the flask service to the streamlit service while passing over an id so I can identify the user?
Process I’m thinking is this:
- User installs app for their Shopify store, when this happens I will start downloading their order data using the flask app (like here) and storing it in a database.
- Once a user visits the app in their Shopify admin I want to direct them to the streamlit service and pass along some id (using flask redirect while passing arguments, or message flashing) so I know which store I need to filter to when showing order details in their dashboard.
I’m new to flask/docker/networking, so any feedback/suggestions on how to do this securely (even if it’s entirely different than the process I outlined above) would be much appreciated!
Like should I get them to login again on the streamlit dashboard?
Here’s what I’ve got so far: GitHub - parker84/shopify-streamlit-example: A simple Shopify app created using Flask and Python
I’m able launch both services locally, and can then authenticate the user through the flask app.