We recently released scopes for our OAuth and I’d like to provide a way for n8n users to register and use scopes as part of their n8n credentials here:
I’m not too familiar with n8n. Can scopes be entered as part of any OAuth credential configuration or does there need to be a code change to collect them and request them at authorize.
If you have any examples of configuration docs that collect scopes, that would be helpful.
Nothing should really change on the n8n side though, right? It is still a redirect url from n8n which you take from n8n to asana and client id and client secret from you take from asana to n8n, the rest is either statically set in asana or dynamically configured within the authorization process.
Although I see that the scopes are now mandatory, which means that existing integrations will probably fail. I didn’t have an account before… well just now, without setting scopes the Auth process does fail. After enabling full or adding specific scopes on the Asana side, the process is no different in n8n from what it used to be.
Scopes aren’t mandatory. A lot of n8n users are opting out which is why I’m here. To see how we could get n8n working with scoped access for the security benefits.
There might be a misunderstanding because that’s not how our OAuth implementation works. Currently, you need to specify scopes at authorize time or scopes access. I don’t think that’s uncommon. Definitely supported by the spec.
Outside of changing Asana’s OAuth implementation, is there no precedent for setting scopes to request in n8n? Examples to point to?
N8n simplifies the OAuth2 credentials creation with its built in tooling. When user takes Asana node into use they’re guided through credentials creation, which on cloud by default suggests the user to create OAuth credential with a view looking like this on the cloud version:
We then open a new popup window with URL https://app.asana.com/-/oauth_authorize?client_id=<client_id>&redirect_uri=<redirect_type>&response_type=code&state=<state>&scope= with no scopes selected to complete their authorization, which is why you’re seeing a lot of n8n users without scopes.
To add scopes support to this credential either a good set of default scopes could be added instead of empty string, or the field could be changed to a visible editable one. There are also other nodes with more complex scope pickers, like AzureEntraCognitiveServicesOAuth2Api.