OAuth Redirect URL

Hi, is it possible for me to edit the redirect URL field?
If so, where can I do that?
image

Another detail, authentication requires the state, where can I place it?

it would be here?

In Insomnia, the field for state is already available, but it’s not present in n8n.
You can also edit the redirect URL field.

Information on your n8n setup

  • n8n version: 1.33.1
  • Database (default: SQLite):
  • n8n EXECUTIONS_PROCESS setting (default: own, main):
  • Running n8n via (Docker, npm, n8n cloud, desktop app): docker
  • Operating system: win 10

You change that with the environment vars when settings up your docker container

Set N8N_EDITOR_BASE_URL and WEBHOOK_URL to your full url including https:// then restart the container.

See all the env variables here

1 Like

Hey,
Thank you for the suggestion, but I did what you suggested and it still didn’t work.

It looks like it is from the screen shots you provided.

You have it set to local host and it is showing local host in the redirect value

There is not a way to edit it independently. Just through those env variables

I understand, but the URL I need would be http://localhost/

How can I remove the /rest/oauth2-credential/callback?

What’s your reason for wanting to change the redirect?
That is set up to work with n8ns oauth2 utilities, changing it would likely break it

And yes usually you can pass state just in the query parameter like you showed, but that depends on the API

I’m trying to authenticate with an API from another company…
For example, I can make a request in Insomnia with these parameters:

But when I try in n8n, I get the following, as I need to enter my login and password right after requesting the token.

Sorry if I didn’t explain it very well.

Redirect uri mismatch means it errors because the URI didn’t match the registered one (the one in that error message im assuming)

Try adding localhost URL in the registered redirect URIs in that service and see if that works

In terms of the basic auth, check the docs of that service of you can change it from basic auth

That is called basic auth. Try using “Basic Auth” with the http node

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.