Invalid parameter: redirect_uri

330 views
Skip to first unread message

Ammon Quackenbush

unread,
Oct 7, 2021, 5:54:24 PM10/7/21
to Django users
I am setting up keycloak with a django webapp and this is the error I am getting:

WE'RE SORRY ...

Invalid parameter: redirect_uri


I have tried setting the LOGOUT_REDIRECT_URL and POST_LOGOUT_REDIRECT_URL settings in my project settings.py but that had no effect.

Any ideas on how I can fix this?

Ammon Quackenbush

unread,
Oct 11, 2021, 6:40:09 PM10/11/21
to Django users
I can set the logout redirect url successfully with LOGOUT_REDIRECT_URL in my project's settings.py, but I still get this error when I try to log in.

Kasper Laudrup

unread,
Oct 12, 2021, 7:17:52 AM10/12/21
to django...@googlegroups.com
On 12/10/2021 00.40, Ammon Quackenbush wrote:
> I can set the logout redirect url successfully with LOGOUT_REDIRECT_URL
> in my project's settings.py, but I still get this error when I try to
> log in.
>

When you log in to what?

You need to share some details, relevant code, error messages etc. if
you want anyone to be able to help you.

Kind regards,

Kasper Laudrup

Anil Felipe Duggirala

unread,
Oct 12, 2021, 9:52:04 AM10/12/21
to django...@googlegroups.com
On Mon, Oct 11, 2021, at 5:40 PM, Ammon Quackenbush wrote:
> I can set the logout redirect url successfully with LOGOUT_REDIRECT_URL
> in my project's settings.py, but I still get this error when I try to
> log in.
>
> On Thursday, October 7, 2021 at 3:54:24 PM UTC-6 Ammon Quackenbush wrote:
>> I am setting up keycloak with a django webapp and this is the error I am getting:
>>
>> WE'RE *SORRY* ...
>> Invalid parameter: redirect_uri
>>
>>
>>
>> I have tried setting the LOGOUT_REDIRECT_URL and POST_LOGOUT_REDIRECT_URL settings in my project settings.py but that had no effect.
>>
>> Any ideas on how I can fix this?

Have you set the LOGIN_REDIRECT_URL ?
Message has been deleted

Ammon Quackenbush

unread,
Oct 12, 2021, 2:01:22 PM10/12/21
to Django users
Setting LOGIN_REDIRECT_URL works in that I am redirected to that URL after I log in. I still see the error when I click on the login screen, though.

Ammon Quackenbush

unread,
Oct 12, 2021, 2:43:51 PM10/12/21
to Django users
It works when I try to access keycloak from 127.0.0.1 but not localhost so it looks like a keycloak setup issue, not a keycloak implementation problem.
Reply all
Reply to author
Forward
0 new messages