File tree Expand file tree Collapse file tree 5 files changed +171
-1
lines changed
workshop_playwright_python/apps Expand file tree Collapse file tree 5 files changed +171
-1
lines changed Original file line number Diff line number Diff line change @@ -164,3 +164,4 @@ cython_debug/
164164requirements.txt
165165generated
166166tests /test_codegen.py
167+ .streamlit /*
Original file line number Diff line number Diff line change @@ -15,7 +15,7 @@ make install-deps-dev
1515
1616- [[ BUG] Host system is missing dependencies to run browsers (WSL2) #19100 ] ( https://github.com/microsoft/playwright/issues/19100 )
1717
18- ## Guides
18+ ## Fundamentals
1919
2020To run some demos, please follow the instructions below.
2121
@@ -30,6 +30,35 @@ make show-trace
3030make codegen
3131```
3232
33+ ## Guides
34+
35+ ### Authentication
36+
37+ To run a frontend application with authentication, you can refer to the following links.
38+
39+ - [ User authentication and information] ( https://docs.streamlit.io/develop/concepts/connections/authentication )
40+ - [ Use Microsoft Entra to authenticate users] ( https://docs.streamlit.io/develop/tutorials/authentication/microsoft )
41+
42+ For example, you can use the following file [ .streamlit/secrets.toml] ( ../.streamlit/secrets.toml ) to set up authentication with Microsoft Entra ID.
43+
44+ ``` toml
45+ [auth ]
46+ redirect_uri = " http://localhost:8501/oauth2callback"
47+ cookie_secret = " xxx"
48+
49+ [auth .microsoft ]
50+ client_id = " your-client-id"
51+ client_secret = " your-client-secret"
52+ server_metadata_url = " https://login.microsoftonline.com/consumers/v2.0/.well-known/openid-configuration"
53+ ```
54+
55+ Then, run the application using the following command:
56+
57+ ``` shell
58+ # Run the application
59+ uv run streamlit run workshop_playwright_python/apps/authentication.py
60+ ```
61+
3362## [ Microsoft Playwright Testing] ( https://learn.microsoft.com/ja-jp/azure/playwright-testing/ )
3463
3564- [ Get Started Sample] ( https://github.com/microsoft/playwright-testing-service/tree/main/samples/get-started )
Original file line number Diff line number Diff line change @@ -5,6 +5,7 @@ description = "A GitHub template repository for Python"
55readme = " README.md"
66requires-python = " >=3.10"
77dependencies = [
8+ " authlib>=1.5.2" ,
89 " playwright>=1.52.0" ,
910 " pytest-playwright>=0.7.0" ,
1011 " streamlit>=1.45.0" ,
You can’t perform that action at this time.
0 commit comments