Hello Amir,
You are right, there are red flags and warnings. By default, API methods do not allow cookie authentication, and require the use of OAuth2. You incur the risk of Cross-Site Request Forgery (
CSRF).
It is recommended to be very cautious in enabling this setting, and make sure to require appropriate XSRF tokens to protect your API.
Have you weighed the option of rather re-writing and implementing the recommended Oauth2
authentication: "For OAuth2 authentication, an OAuth2 token is issued to a specific client ID, which means that this client ID can be used for restricting access to your APIs. When you register an iOS or Android application in the Google Cloud Platform Console, you create a client ID for it. This client ID is the one requesting an OAuth2 token from Google for authentication purposes. When the back-end API is protected by auth, an OAuth2 access token is sent and opened by Google Cloud Endpoints, the client ID is extracted from the token, and then the ID is compared to the backend's declared acceptable Client ID list (the clientIds list)."
You can find related information in the "google endpoints (java), session cookies and iOS"
thread.