I had a HTTP module to connect with a custom query to BigQuery. I setup API access for my BigQuery instance (via Oauth2 credentials) and It very well a couple of months ago. I had a pause where I didn’t use it, and now I want to reuse those credentials for a new project. Unfortunalely it doesnt work anymore. Trying to reconnect, it throws an error. It is like n8n does not send scope parameter together with credentials.
I notice that recent changelog had some scope changes to oauth2 credentials, so I fear those might have affected how scopes are sen
Hello @MutedJam ,
The above issue still exists in v0.207.1. I am unable to authorize google oauth2 api credentials. I believe the problem is not that the scope was not getting saved. It is present in decrypted credentials. The problem is that scope is being deleted from the object inorder to apply default values. This change has been carried out very recently to remove the default hidden scopes in some nodes from credentials. But for this to work we have to add another condition to check if the scope type is hidden. I am not sure about this. Please correct me if I am wrong. For now I am thinking to comment the block and build a custom image. Please advice if this would be appropriate in the whole picture.
Are you seeing the issue when doing the initial authentication step or on token refresh? Can you share a bit more about what you are doing? The fix we put in place has worked during out testing so it would be handy to know what you are doing so we can see if the issue can be reproduced.
I am trying to add a new credential via n8n UI. For example a google Oauth2 API credentials. I am adding Client Id, Client secret and scope. I save it and its getting saved. I can also see the scope in decrypted creds. What I suspect is that irrespective of the scope type being hidden or otherwise, its being deleted from decrypted data object before calling the auth url. If I comment that delete step out, the node works fine.
That is perfect I have managed to pick apart what you have said to reproduce the issue, It looks like while using Google OAuth2 API as a credential type it shows the scope message but if you use the OAuth2 API credential and fill out the information needed for Google OAuth it does work as expected so it looks like it is likely going to be an issue with just that one credential type.
It looks like someone has left a note on the PR that has fixed this for some PRs to say the same thing, I am going to make the team aware of this internally as well so we can get this resolved.