Rohit commited on
Commit ·
3d4c371
1
Parent(s): 067daf8
this
Browse files
Auth.py
CHANGED
|
@@ -2,6 +2,9 @@
|
|
| 2 |
from pymongo.mongo_client import MongoClient
|
| 3 |
import streamlit as st
|
| 4 |
from streamlit_option_menu import option_menu
|
|
|
|
|
|
|
|
|
|
| 5 |
|
| 6 |
st.set_page_config(page_title="Reminder App", page_icon=":bell:", layout="centered")
|
| 7 |
|
|
@@ -9,7 +12,7 @@ st.set_page_config(page_title="Reminder App", page_icon=":bell:", layout="center
|
|
| 9 |
uri = st.secrets["MONGO_CONNECTION_STRING"]
|
| 10 |
|
| 11 |
# create a new client and connect to the server
|
| 12 |
-
client = MongoClient(uri)
|
| 13 |
|
| 14 |
try:
|
| 15 |
client.admin.command('ping')
|
|
|
|
| 2 |
from pymongo.mongo_client import MongoClient
|
| 3 |
import streamlit as st
|
| 4 |
from streamlit_option_menu import option_menu
|
| 5 |
+
import certifi
|
| 6 |
+
|
| 7 |
+
ca = certifi.where()
|
| 8 |
|
| 9 |
st.set_page_config(page_title="Reminder App", page_icon=":bell:", layout="centered")
|
| 10 |
|
|
|
|
| 12 |
uri = st.secrets["MONGO_CONNECTION_STRING"]
|
| 13 |
|
| 14 |
# create a new client and connect to the server
|
| 15 |
+
client = MongoClient(uri, tlsCAFile=ca)
|
| 16 |
|
| 17 |
try:
|
| 18 |
client.admin.command('ping')
|