sf_git icon indicating copy to clipboard operation
sf_git copied to clipboard

authentication not working

Open sfc-gh-sredding opened this issue 1 year ago • 10 comments

I am getting the following error when trying to sfgit fetch:

sf_git.models.AuthenticationError: AuthenticationError: Finalized Authentication but didnt find a tokenin final response : {status_code : 200, url : https://app.snowflake.com/?error=LOGIN_FAILED, cookies : <RequestsCookieJar[<Cookie snowflake_deployment=apps-api.c1.centralindia.azure.app.snowflake.com for app.snowflake.com/>]>

sfc-gh-sredding avatar Mar 14 '24 22:03 sfc-gh-sredding

@sfc-gh-sredding Hi, seems like authentication flow was updated, it is breaking on my side too. Will have a look and keep you posted.

tdambrin avatar Mar 16 '24 15:03 tdambrin

hi @tdambrin, is there any update on this? I get AuthenticationError: No valid endpoint for account

stuartjd-lendable avatar May 14 '24 16:05 stuartjd-lendable

hi @stuartjd-lendable , Snowflake recently released their Git Integration. I did not take the time to look into the authentication flow update and am trying to find a more reliable way than to replicate the UI OAuth flow. If you have any idea on the topic, I would love to discuss it. Otherwise, I will talk with people from Snowflake.

FYI: The snowflake documentation for Git Integration

tdambrin avatar May 15 '24 04:05 tdambrin

Hi @tdambrin after reviewing the Snowflake documentation, I can confirm that they are not offering the critical ability to export worksheets out of Snowsight. (see excerpt below from their Git Operations page) I was really hoping to use your solution for this as I'm switching between accounts and would rather eat eggshells than copy/paste my zillion worksheets over haha.

Were you ever able to figure anything out about the new authentication method? Also where did you find the documentation for the API calls that your code is making please?

image

KojoDH avatar Aug 29 '24 03:08 KojoDH

Hi @tdambrin I've done some digging at my organization and I've noticed that the auth fails once the app calls /complete-oauth/snowflake. I have reached out to our snowflake rep to see if there is an issue with how this final call is made as I also am unable to find the documentation for the API calls to verify this.

rich-caceres avatar Sep 27 '24 19:09 rich-caceres

Hi @rich-caceres yes debugged to the same point. Overall, the code relies on internal APIs at Snowflake that are not public. I'd like to think that they are stable enough except for the authentication part which is why I was also seeking alternatives from snowflake but inconclusive so far. Please reach out if you get an answer from them !

tdambrin avatar Sep 28 '24 16:09 tdambrin

Hi @tdambrin after reviewing the Snowflake documentation, I can confirm that they are not offering the critical ability to export worksheets out of Snowsight. (see excerpt below from their Git Operations page) I was really hoping to use your solution for this as I'm switching between accounts and would rather eat eggshells than copy/paste my zillion worksheets over haha.

Were you ever able to figure anything out about the new authentication method? Also where did you find the documentation for the API calls that your code is making please?

image

Hi @KojoDH, sorry for the last reply. I currently don't have the time to dig into the error especially if this is for a temporary fix until a new update on their auth flow. There is no documentation for the APIs used as they are not public but it's inspired by this repository and enhanced using a simple network analyzer.

tdambrin avatar Sep 28 '24 17:09 tdambrin

@tdambrin We heard back from our snowflake rep after she spoke to the technical team and they have recommended using Snowsight Extensions instead of sf_git. They appear to have no intention to provide any additional context on fixing the issue with sf_git auth. They have updated Snowsight Extension recently as there was an issue that was not allowing users the ability to import worksheets to another environment. I do wish we could use this app but as I stated before, there appears to be no intention to provide additional insight on fixing this issue.

rich-caceres avatar Oct 09 '24 14:10 rich-caceres

hi @rich-caceres thanks for the info. I do not love the idea of just updating the auth flow without a component maintained by snowflake because of how unreliable that is but if they updated the extensions I can have a look.

tdambrin avatar Oct 10 '24 00:10 tdambrin

Halfway there! See Release 1.4.0 🥳

PWD is fixed, will do SSO later

tdambrin avatar Oct 10 '24 07:10 tdambrin