Login to Google delegate server on my custom button

29 views
Skip to first unread message

Mindaugas Arsulis

unread,
Apr 1, 2020, 2:52:35 AM4/1/20
to CAS Community
Hello,

I am trying to log in to google on my custom login.html. I have cas 5.2.2 and i have added cas-server-support-pac4j-webflow. What do I put in href on my custom link so the work flow of google sing in would work?

Mindaugas Arsulis

unread,
Apr 1, 2020, 10:25:29 AM4/1/20
to CAS Community
I had overcome this by writing it like:

"<li><a href="" th:href="${pac4jUrls[0].redirectUrl}" ..."

Another problem, have you ever encountered a warning when connecting to google thats says: 

"Legacy People API has not been used in project 12345 before or it is disabled. Enable it by visiting https://console.developers.google.com/apis/api/legacypeople.googleapis.com/overview?project=12345 then retry. If you enabled this API recently, wait a few minutes for the action to propagate to our systems and retry."?

Mindaugas Arsulis

unread,
Apr 2, 2020, 4:40:54 AM4/2/20
to CAS Community
Okey so the problem was that google changed people profile api. It was linked with 
the link that is now working is "https://www.googleapis.com/oauth2/v3/userinfo"
anybody know how to override Google2ProfileDefinition class?

Andy Ng

unread,
Apr 5, 2020, 9:53:19 PM4/5/20
to CAS Community
Hi Mindaugas,

I have encounter this issue before, from what i know there are 3 ways to handle this issue:

1. Update CAS to 5.3.x (Recommended), which will fix this issue
2. Update pac4j-oauth to latest version
  - In your Maven (suppose you are using maven), add an entry to pom.xml similar to like:

<dependency>
    pac4j-oauth
    3.8.3
</dependency>

From my experience, it should be working ok, however still option 1 is the best fix.

3. Update Google2ProfileDefinition class directly (Can be done but not the best idea, would not recommend since the above would fix it nicely without manual fix)


See if the above helps you.

Cheers!
- Andy

Reply all
Reply to author
Forward
0 new messages