Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions streamlit_authenticator/models/cookie_model.py
Original file line number Diff line number Diff line change
Expand Up @@ -76,12 +76,12 @@ def get_cookie(self) -> Optional[Dict[str, Any]]:
If valid, returns a dictionary containing the cookie's data.
Returns None if the cookie is expired or invalid.
"""
if st.session_state['logout']:
return False
# self.token = self.cookie_manager.get(self.cookie_name)
if st.session_state.get('logout'):
return None
self.token = st.context.cookies[self.cookie_name] if self.cookie_name in \
st.context.cookies else None
if self.token is not None:
self.cookie_manager.set(self.cookie_name, self.token)
self.token = self._token_decode()
if (self.token is not False and 'username' in self.token and
self.token['exp_date'] > datetime.now().timestamp()):
Expand Down