<?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>Login oauth (Google) not working</title>
  <link rel="self" href="https://liferay.dev/c/message_boards/find_thread?p_l_id=119785294&amp;threadId=114242052" />
  <subtitle>Login oauth (Google) not working</subtitle>
  <id>https://liferay.dev/c/message_boards/find_thread?p_l_id=119785294&amp;threadId=114242052</id>
  <updated>2026-04-03T20:24:48Z</updated>
  <dc:date>2026-04-03T20:24:48Z</dc:date>
  <entry>
    <title>RE: Login oauth (Google) not working</title>
    <link rel="alternate" href="https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=114249413" />
    <author>
      <name>Davide Dellai</name>
    </author>
    <id>https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=114249413</id>
    <updated>2019-07-11T12:39:31Z</updated>
    <published>2019-07-11T12:39:31Z</published>
    <summary type="html">I can&amp;#39;t understand where to find the redirect page. I mean, my website url should be the same of the redirect page. When a user (not logged in) opens the web page (&lt;a href="www.mysite.com"&gt;www.mysite.com&lt;/a&gt;) he sees the button &amp;#34;Sign in with google&amp;#34;. And then he can enter in the website at the same url. But it&amp;#39;s not working. It shows me a blank activity.  And I also have this error if I change the client type &amp;#34;Grant type &amp;#34;PKCE ... &amp;#34; is unsupported for this client type.</summary>
    <dc:creator>Davide Dellai</dc:creator>
    <dc:date>2019-07-11T12:39:31Z</dc:date>
  </entry>
  <entry>
    <title>RE: Login oauth (Google) not working</title>
    <link rel="alternate" href="https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=114245489" />
    <author>
      <name>Victor Galan</name>
    </author>
    <id>https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=114245489</id>
    <updated>2019-07-10T21:40:25Z</updated>
    <published>2019-07-10T21:40:25Z</published>
    <summary type="html">HeyYou have to configure an oauth2 application in the portal if you want to use it, you can chose the oauth2 flow that fits your use case, for what you are describing you should go for authorization code (PKCS), and in screens its the oauth2Redirect mode, this would open a browser with the login page, which would contain login with google button.You can check the docs &lt;a href="https://portal.liferay.dev/docs/7-1/deploy/-/knowledge_base/d/oauth-2-0"&gt;here&lt;/a&gt;I hope it helps</summary>
    <dc:creator>Victor Galan</dc:creator>
    <dc:date>2019-07-10T21:40:25Z</dc:date>
  </entry>
  <entry>
    <title>Login oauth (Google) not working</title>
    <link rel="alternate" href="https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=114242051" />
    <author>
      <name>Davide Dellai</name>
    </author>
    <id>https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=114242051</id>
    <updated>2019-07-10T08:26:50Z</updated>
    <published>2019-07-10T08:26:50Z</published>
    <summary type="html">Hi,&lt;br /&gt;I&amp;#39;m trying to login using the Liferay Mobile SDK for Android through a google oauth2 authentication but it&amp;#39;s not working.&lt;br /&gt;I haven&amp;#39;t a liferay email to authenticate but it&amp;#39;s the company domain like:&lt;br /&gt;&lt;br /&gt;myname@mycompanyname.it&lt;br /&gt;&lt;br /&gt;this is a google domain. In the web portal I can authenticate just pressing the button &amp;#34;Login with google&amp;#34;. That&amp;#39;s what i&amp;#39;ve done so far.&lt;br /&gt;&lt;br /&gt;&lt;blockquote&gt;&amp;lt;com.liferay.mobile.screens.auth.login.LoginScreenlet &lt;br /&gt;    android:id=&amp;#34;@+id/login_screenlet&amp;#34; &lt;br /&gt;android:layout_width=&amp;#34;match_parent&amp;#34; &lt;br /&gt;    android:layout_height=&amp;#34;match_parent&amp;#34; &lt;br /&gt;    app:layoutId=&amp;#34;@layout/login_material&amp;#34; &lt;br /&gt;    android:visibility=&amp;#34;visible&amp;#34; &lt;br /&gt;    app:basicAuthMethod=&amp;#34;email&amp;#34; &lt;br /&gt;    app:loginMode=&amp;#34;oauth2UsernameAndPassword&amp;#34; &lt;br /&gt;    app:oauth2Redirect=&amp;#34;@string/liferay_server&amp;#34; &lt;br /&gt;    app:credentialsStorage=&amp;#34;shared_preferences&amp;#34; &lt;br /&gt;    app:oauth2ClientId=&amp;#34;@string/clientIdOauth&amp;#34; &lt;br /&gt;    app:companyId=&amp;#34;@string/bot_liferay_company_id&amp;#34; /&amp;gt;&lt;br /&gt;&lt;/blockquote&gt; I got the oauth2ClientId key from the tab  &amp;#34;Instance settings&amp;#34; of the portal under the section &amp;#34;Authentication&amp;#34; and then &amp;#34;Google&amp;#34; is that correct?But here I have 2 problems. First one is that when I run the app and I try to login I get an error message &amp;#34;clientSecret cannot be null or empty&amp;#34; and the second is &amp;#34;Where is this clientSecret key??&amp;#34;&lt;br /&gt;I also tried to change the loginMode in app:loginMode=&amp;#34;oauth2Redirect&amp;#34;. But in this way the login screen not appears. I&amp;#39;ve an empty activity. So, as last hope, I tried changing again the loginMode in &amp;#34;Basic&amp;#34;. And in this way I&amp;#39;ve got this error &amp;#34;com.liferay.mobile.android.exception.AuthenticationException: java.lang.SecurityException&amp;#34;. I can&amp;#39;t understand if it&amp;#39;s possible authenticate an user using a google account instead a liferay account because it&amp;#39;s not working. Thanks </summary>
    <dc:creator>Davide Dellai</dc:creator>
    <dc:date>2019-07-10T08:26:50Z</dc:date>
  </entry>
</feed>
