SFM/main.py
2026-06-04 16:27:02 +03:00

29 lines
676 B
Python

import streamlit as st
from dotenv import load_dotenv
from app.auth.service import AuthService, clear_session
from app.config import apply_raisa_env_aliases
from app.ui import render_env_check, render_profile
def main() -> None:
load_dotenv()
apply_raisa_env_aliases()
st.set_page_config(page_title="SFM Streamlit", page_icon=":lock:", layout="wide")
st.title("SFM Streamlit: Keycloak-only auth")
render_env_check()
if not AuthService().run():
return
render_profile(st.session_state["user_profile"])
if st.button("Выйти", type="secondary"):
clear_session()
st.rerun()
if __name__ == "__main__":
main()