I was discussing about this situation in another topic.
As the code of the examples of Authentication without SSO Guide save the information in App Sesion State, you only need to define once the funcion and call in each page the auth function. Just a simple example
main_page.py
import streamlit as st
from password_check import check_password
if check_password():
st.write("#Hello π")
pages/01_page.py
import streamlit as st
from password_check import check_password
if check_password():
st.write("#Page 1 π")
In this way, all elements that are inside check_password()
will have an password verification before showing the data.