giswqs / geemap-streamlit

geemap with streamlit
https://gishub.org/streamlit-geemap
MIT License
14 stars 9 forks source link

Another question about add EE credentials to secrets. #2

Closed sm-potter closed 1 year ago

sm-potter commented 1 year ago

This isn't so much an issue but rather a question, I am not positive if this is the best place to ask given this but here it is.

I also am confused about how to allow EE to initialize through secrets. I followed your previous instructions and added EARTHENGINE_TOKEN="1//my_token" to my streamlit secrets, but when I launch the app here https://sm-potter-streamlit-fire-streamlit-app-7sy8c9.streamlit.app/CNN_Predictions, EE is still failing to initialize.

Is the token the only thing that needs to be included to allow initialization?

giswqs commented 1 year ago

Yes, that should be all you need. Do you any ee.Authenticate() or ee.Initialize() or any ee functions before geemap.Map() or geemap.ee_initialize(). Otherwise, authentication will fail.

sm-potter commented 1 year ago

Ok, I don't do that but I will keep playing around with it, thanks.