Last active
September 15, 2022 19:22
-
-
Save oguzhari/990a1af80096aeb2dad8169443b82113 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| def create_cred_file(): | |
| cred_str = '{"access_token": "' + st.secrets["access_token"] +\ | |
| '", "client_id": "' + st.secrets["client_id"] +\ | |
| '", "client_secret": "' + st.secrets["client_secret"] + \ | |
| '", "refresh_token": "' + st.secrets["refresh_token"] + \ | |
| '", "token_expiry": "' + st.secrets["token_expiry"] + \ | |
| '", "token_uri": "' + st.secrets["token_uri"] + \ | |
| '", "user_agent": null' + \ | |
| ', "revoke_uri": "' + st.secrets["revoke_uri"] + \ | |
| '", "id_token": null' + \ | |
| ', "id_token_jwt": null' + \ | |
| ', "token_response": {"access_token": "' + st.secrets["token_response"]["access_token"] + \ | |
| '", "expires_in": ' + str(st.secrets["token_response"]["expires_in"]) + \ | |
| ', "refresh_token": "' + st.secrets["token_response"]["refresh_token"] + \ | |
| '", "scope": "' + st.secrets["token_response"]["scope"] + \ | |
| '", "token_type": "' + st.secrets["token_response"]["token_type"] + \ | |
| '"}, "scopes": ["https://www.googleapis.com/auth/drive"]' + \ | |
| ', "token_info_uri": "' + st.secrets["token_info_uri"] + \ | |
| '", "invalid": false' + \ | |
| ', "_class": "' + st.secrets["_class"] + \ | |
| '", "_module": "' + st.secrets["_module"] + '"}' | |
| text_file = open("mycreds.txt", "w") | |
| n = text_file.write(cred_str) | |
| text_file.close() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment