Skip to content

Commit

Permalink
fix code
Browse files Browse the repository at this point in the history
  • Loading branch information
Josh-XT committed Jun 13, 2024
1 parent f965a74 commit f03922f
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions components/Auth.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,10 +32,12 @@ def google_sso_button():
if magic_link_uri.endswith("/"):
magic_link_uri = magic_link_uri[:-1]
code = st.query_params["code"] if "code" in st.query_params else ""
if isinstance(st.query_params["code"], list):
code = str(st.query_params["code"][0])
if isinstance(code, list):
code = str(code[0])
else:
code = str(st.query_params["code"])
code = str(code)
if code == "None":
code = ""
if code == "" and "token" not in st.query_params:
result = st.button("Sign in with Google", key="google_sso_button")
if result:
Expand Down

0 comments on commit f03922f

Please sign in to comment.