<?xml version="1.0" encoding="UTF-8"?>
<feed xmlns="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <title>OAuth2 permission cancel redirects to a 400 error page</title>
  <link rel="self" href="https://liferay.dev/c/message_boards/find_thread?p_l_id=119785294&amp;threadId=117829003" />
  <subtitle>OAuth2 permission cancel redirects to a 400 error page</subtitle>
  <id>https://liferay.dev/c/message_boards/find_thread?p_l_id=119785294&amp;threadId=117829003</id>
  <updated>2026-06-02T00:17:52Z</updated>
  <dc:date>2026-06-02T00:17:52Z</dc:date>
  <entry>
    <title>RE: OAuth2 permission cancel redirects to a 400 error page</title>
    <link rel="alternate" href="https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=120584381" />
    <author>
      <name>Dave Kliczbor</name>
    </author>
    <id>https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=120584381</id>
    <updated>2021-02-02T15:23:01Z</updated>
    <published>2021-02-02T15:23:01Z</published>
    <summary type="html">&lt;p&gt;The HTTPS endpoint for your liferay instance probably is not liferay
  itself (common case if you are behind a loadbalancer) or you are
  accessing your liferay instance via HTTP instead of HTTPS.&lt;/p&gt;
&lt;p&gt;If this is the case, the HTTP 400 stems from the Apache CXF library,
  saying that you're trying to use OAuth2 using an unsecured connection.&lt;/p&gt;
&lt;p&gt;If you're on a local dev server via HTTP, you need to disable the
  security check. In your liferay home, folder osgi/configs, create the
  file
  com.liferay.oauth2.provider.rest.internal.endpoint.access.token.LiferayAccessTokenServiceRegistrator.cfg
  with the following content:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;block.unsecure.requests=false
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;If you're on a server behind a load balancer, you'll need the
  following lines in your portal-ext.properties (web.server.protocol
  must not be set to anything!):&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;#web.server.protocol=
web.server.forwarded.host.enabled=true
web.server.forwarded.protocol.enabled=true
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt; &lt;/p&gt;</summary>
    <dc:creator>Dave Kliczbor</dc:creator>
    <dc:date>2021-02-02T15:23:01Z</dc:date>
  </entry>
  <entry>
    <title>OAuth2 permission cancel redirects to a 400 error page</title>
    <link rel="alternate" href="https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=117829002" />
    <author>
      <name>Simon Dorr</name>
    </author>
    <id>https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=117829002</id>
    <updated>2019-11-20T10:17:40Z</updated>
    <published>2019-11-20T10:17:40Z</published>
    <summary type="html">Hello community,&lt;br /&gt;&lt;br /&gt;I implemented a OAuth2 flow with Liferay 7.1, as described here: &lt;a href="https://portal.liferay.dev/docs/7-1/deploy/-/knowledge_base/d/authorizing-account-access-with-oauth2"&gt;https://portal.liferay.dev/docs/7-1/deploy/-/knowledge_base/d/authorizing-account-access-with-oauth2&lt;/a&gt;&lt;br /&gt;the process itself works nicely, but there is still a small issue. When a user decides to cancel the OAuth2 flow (see the attachment, the user clicks &amp;#34;abbrechen&amp;#34;). The user is redirected to /o/oauth2/authorize/decision. A URL that only responds with a 400 error.&lt;br /&gt;&lt;br /&gt;Do I miss any permissions or configurations?&lt;br /&gt;Since the /o/ path is reserved, I am not able to simply assign a custom page to this path&lt;br /&gt;&lt;br /&gt;​​​​​​​best regards&lt;br /&gt;Simon</summary>
    <dc:creator>Simon Dorr</dc:creator>
    <dc:date>2019-11-20T10:17:40Z</dc:date>
  </entry>
</feed>
