<?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>Best method for Authentication in Rest portlet</title>
  <link rel="self" href="https://liferay.dev/c/message_boards/find_thread?p_l_id=119785294&amp;threadId=118162772" />
  <subtitle>Best method for Authentication in Rest portlet</subtitle>
  <id>https://liferay.dev/c/message_boards/find_thread?p_l_id=119785294&amp;threadId=118162772</id>
  <updated>2026-04-04T12:45:45Z</updated>
  <dc:date>2026-04-04T12:45:45Z</dc:date>
  <entry>
    <title>RE: Best method for Authentication in Rest portlet</title>
    <link rel="alternate" href="https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=118257092" />
    <author>
      <name>Vahid Kh</name>
    </author>
    <id>https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=118257092</id>
    <updated>2020-01-11T06:42:22Z</updated>
    <published>2020-01-11T06:42:22Z</published>
    <summary type="html">&lt;html&gt;&lt;head&gt;&lt;/head&gt;&lt;body&gt;Thanks dear David.&lt;br&gt;Assume I have a &lt;strong&gt;React&lt;/strong&gt; app that I want to authorize it by PKCE method.&lt;br&gt;Now, I want to create&amp;nbsp;a new&amp;nbsp;&lt;strong&gt;OAuth 2 Application &lt;/strong&gt;for this&lt;strong&gt;&amp;nbsp;, &lt;/strong&gt;what &lt;strong&gt;Client Profile&amp;nbsp;&lt;/strong&gt; should I choose?&lt;br&gt;&lt;strong&gt;&lt;/strong&gt;PKCE only exist in User &lt;strong&gt;Agent Application, Native Application &lt;/strong&gt;and&lt;strong&gt;&amp;nbsp;Other , &lt;/strong&gt;but I have a problem when I choose one of this client profiles on saving new OAuth application I get this Error:&lt;br&gt;&lt;strong&gt;&lt;/strong&gt;&lt;pre&gt;&lt;code&gt;Grant type "PKCE Extended Authorization Code" is unsupported for this client type.&lt;/code&gt;&lt;/pre&gt;&lt;/body&gt;&lt;/html&gt;</summary>
    <dc:creator>Vahid Kh</dc:creator>
    <dc:date>2020-01-11T06:42:22Z</dc:date>
  </entry>
  <entry>
    <title>RE: Best method for Authentication in Rest portlet</title>
    <link rel="alternate" href="https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=118188451" />
    <author>
      <name>David H Nebinger</name>
    </author>
    <id>https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=118188451</id>
    <updated>2020-01-02T14:00:53Z</updated>
    <published>2020-01-02T14:00:53Z</published>
    <summary type="html">React native is nothing special, it does not preclude using PKCE at all.  If you google for &amp;#34;react native pkce&amp;#34; you&amp;#39;ll get a bunch of hits for implementation details, including &lt;a href="https://formidable.com/blog/2018/oauth-and-pkce-with-react-native/"&gt;https://formidable.com/blog/2018/oauth-and-pkce-with-react-native/&lt;/a&gt; but there are a bunch of other options too.</summary>
    <dc:creator>David H Nebinger</dc:creator>
    <dc:date>2020-01-02T14:00:53Z</dc:date>
  </entry>
  <entry>
    <title>RE: Best method for Authentication in Rest portlet</title>
    <link rel="alternate" href="https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=118186267" />
    <author>
      <name>Mohammed Yasin</name>
    </author>
    <id>https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=118186267</id>
    <updated>2020-01-02T11:26:04Z</updated>
    <published>2020-01-02T11:26:04Z</published>
    <summary type="html">You need to create a client id and client secret from control panel-&amp;gt;oauth2administration and share that with react app and mobile app .</summary>
    <dc:creator>Mohammed Yasin</dc:creator>
    <dc:date>2020-01-02T11:26:04Z</dc:date>
  </entry>
  <entry>
    <title>RE: Best method for Authentication in Rest portlet</title>
    <link rel="alternate" href="https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=118185638" />
    <author>
      <name>Vahid Kh</name>
    </author>
    <id>https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=118185638</id>
    <updated>2020-01-02T11:11:20Z</updated>
    <published>2020-01-02T11:11:20Z</published>
    <summary type="html">How can I find client id and client secret in my React App or my Mobile  App ?&lt;br /&gt;My user only have his username and password and </summary>
    <dc:creator>Vahid Kh</dc:creator>
    <dc:date>2020-01-02T11:11:20Z</dc:date>
  </entry>
  <entry>
    <title>RE: Best method for Authentication in Rest portlet</title>
    <link rel="alternate" href="https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=118185283" />
    <author>
      <name>Mohammed Yasin</name>
    </author>
    <id>https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=118185283</id>
    <updated>2020-01-02T10:13:21Z</updated>
    <published>2020-01-02T10:13:21Z</published>
    <summary type="html">Hi ,OAuth 2.0 would suit you , first you send a request with client id and client secret  and get the access token and then use access token for processing the following requests</summary>
    <dc:creator>Mohammed Yasin</dc:creator>
    <dc:date>2020-01-02T10:13:21Z</dc:date>
  </entry>
  <entry>
    <title>RE: Best method for Authentication in Rest portlet</title>
    <link rel="alternate" href="https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=118182891" />
    <author>
      <name>Vahid Kh</name>
    </author>
    <id>https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=118182891</id>
    <updated>2020-01-02T08:16:45Z</updated>
    <published>2020-01-02T08:16:45Z</published>
    <summary type="html">But this is not a principles and satisfying solution, opening a popup window its not a lovely solution.&lt;br /&gt;​​​​​​​On the other hand assume I want to use &lt;strong&gt;React Native&lt;/strong&gt; as my interface, It is certainly not possible to open a window in that environment.&lt;br /&gt;Liferay doesn&amp;#39;t have a solid way to do it?</summary>
    <dc:creator>Vahid Kh</dc:creator>
    <dc:date>2020-01-02T08:16:45Z</dc:date>
  </entry>
  <entry>
    <title>RE: Best method for Authentication in Rest portlet</title>
    <link rel="alternate" href="https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=118172151" />
    <author>
      <name>Jack Bakker</name>
    </author>
    <id>https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=118172151</id>
    <updated>2019-12-30T15:49:50Z</updated>
    <published>2019-12-30T15:49:50Z</published>
    <summary type="html">Hi Vahid, I am guessing you have a decoupled frontend React or Angular app which you want to connect to a REST api you developed. Have you looked at David Nebinger&amp;#39;s blog &lt;a href="https://liferay.dev/blogs/-/blogs/liferay-oauth-2-0-authorization-flows"&gt;https://liferay.dev/blogs/-/blogs/liferay-oauth-2-0-authorization-flows&lt;/a&gt;.  I think the PKCE section might be of interest to you. I wouldn&amp;#39;t say JWT is a login approach though maybe you can describe more about what you mean.</summary>
    <dc:creator>Jack Bakker</dc:creator>
    <dc:date>2019-12-30T15:49:50Z</dc:date>
  </entry>
  <entry>
    <title>RE: Best method for Authentication in Rest portlet</title>
    <link rel="alternate" href="https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=118166640" />
    <author>
      <name>Christoph Rabel</name>
    </author>
    <id>https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=118166640</id>
    <updated>2019-12-30T08:31:56Z</updated>
    <published>2019-12-30T08:31:56Z</published>
    <summary type="html">We usually require the user to authenticate normally in LIferay and sent the session cookie to the backend with each request. Then you get the user automatically. But I see, for you it is different.&lt;br /&gt;&lt;br /&gt;Is OAuth 2.0 an option? I think, this works only in 7.1+, for 7.1 maybe even EE only.&lt;br /&gt;&lt;br /&gt;&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;</summary>
    <dc:creator>Christoph Rabel</dc:creator>
    <dc:date>2019-12-30T08:31:56Z</dc:date>
  </entry>
  <entry>
    <title>RE: Best method for Authentication in Rest portlet</title>
    <link rel="alternate" href="https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=118167663" />
    <author>
      <name>Vahid Kh</name>
    </author>
    <id>https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=118167663</id>
    <updated>2019-12-30T06:17:08Z</updated>
    <published>2019-12-30T06:17:08Z</published>
    <summary type="html">I have a rest module in my Liferay as my backend, at other side as frontend, I have a full React or Angular  App (No React or Angular as portlet) that must communicate with my rest module, everything is OK but,&lt;br /&gt;How can I authorize client request by username and password for Role and Permission , In fact I want a approach for login like JWT  </summary>
    <dc:creator>Vahid Kh</dc:creator>
    <dc:date>2019-12-30T06:17:08Z</dc:date>
  </entry>
  <entry>
    <title>RE: Best method for Authentication in Rest portlet</title>
    <link rel="alternate" href="https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=118160958" />
    <author>
      <name>Christoph Rabel</name>
    </author>
    <id>https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=118160958</id>
    <updated>2019-12-29T16:27:51Z</updated>
    <published>2019-12-29T16:27:51Z</published>
    <summary type="html">Could you be a bit more specific? What is your usecase? What are you trying to do?</summary>
    <dc:creator>Christoph Rabel</dc:creator>
    <dc:date>2019-12-29T16:27:51Z</dc:date>
  </entry>
  <entry>
    <title>Best method for Authentication in Rest portlet</title>
    <link rel="alternate" href="https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=118162771" />
    <author>
      <name>Vahid Kh</name>
    </author>
    <id>https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=118162771</id>
    <updated>2019-12-28T06:05:15Z</updated>
    <published>2019-12-28T06:05:15Z</published>
    <summary type="html">Hello&lt;br /&gt;What is the best method for Authentication in Rest portlet ?</summary>
    <dc:creator>Vahid Kh</dc:creator>
    <dc:date>2019-12-28T06:05:15Z</dc:date>
  </entry>
</feed>
