https://github.com/link89/st_demo
https://github.com/link89/st_demo
Last synced: over 1 year ago
JSON representation
- Host: GitHub
- URL: https://github.com/link89/st_demo
- Owner: link89
- License: gpl-3.0
- Created: 2024-06-17T13:53:03.000Z (about 2 years ago)
- Default Branch: main
- Last Pushed: 2024-06-20T01:47:18.000Z (about 2 years ago)
- Last Synced: 2025-02-02T00:47:34.523Z (over 1 year ago)
- Language: Python
- Size: 78.1 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Streamlit Demo
## Description
This is a demo project to show how to use Streamlit to build a web app with session and authentication support.
## Getting Started
Setup a virtual environment using poetry:
```bash
poetry install
```
This app use GitHub App as OAuth2 provider.
To run the app, you need to create a GitHub App first.
You may follow [Registering a GitHub App - GitHub Docs](https://docs.github.com/en/apps/creating-github-apps/registering-a-github-app/registering-a-github-app) to create a GitHub App. Note that the redirect uri should be `http://localhost:8051/` if you run the app locally.
And then create a `.streamlit/secrets.toml` file in the project root with the following content:
```toml
config = """
oauth2_provider:
client_id:
client_secret:
login_url: https://github.com/login/oauth/authorize
access_token_url: https://github.com/login/oauth/access_token
redirect_uri: http://localhost:8051/ # change this to your actual redirect uri
"""
```