https://github.com/simplylu/nicegithublogin
Simple implementation of the GitHub OAuth authentication flow within NiceGui
https://github.com/simplylu/nicegithublogin
github-oauth nicegui python3
Last synced: 9 months ago
JSON representation
Simple implementation of the GitHub OAuth authentication flow within NiceGui
- Host: GitHub
- URL: https://github.com/simplylu/nicegithublogin
- Owner: simplylu
- License: gpl-3.0
- Created: 2024-03-20T09:15:57.000Z (almost 2 years ago)
- Default Branch: main
- Last Pushed: 2025-02-16T12:23:59.000Z (11 months ago)
- Last Synced: 2025-03-24T14:40:03.837Z (10 months ago)
- Topics: github-oauth, nicegui, python3
- Language: Python
- Homepage:
- Size: 17.6 KB
- Stars: 2
- Watchers: 1
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
NiceGHLogin
===
This is just a sample implementation of the GitHub OAuth login flow within [NiceGui](https://nicegui.io). I followed [this](https://docs.github.com/en/apps/oauth-apps/building-oauth-apps/authorizing-oauth-apps) documentation to learn about the flow.
### Usage
1. [Create an OAuth app on Github](https://docs.github.com/en/apps/oauth-apps/building-oauth-apps/creating-an-oauth-app)
2. Copy your `CLIENT_ID`, `CLIENT_SECRET` and `CALLBACK_URL` to the `.env.bak` file and remove the .bak extension
3. Generate some SSL Certificates (`openssl req -x509 -newkey rsa:4096 -nodes -out cert.pem -keyout key
.pem -days 365`)
4. Start the appliction with `python3 app.py`
### Important
You need to provide SSL certificates using Uvicorn or a Traefik reverse Proxy, as GitHub does not allow insecure callback URLs with HTTP.