PHP error with oauth2

Welcome.
However, I can’t get to the google connect page as i click on my anchor link.
The steps for PHP seem different when doing the New Server Connect Routing.
image

My link is set with the route:
image

@Teodor what is the exact step here for PHP developers please?

See landing page upon hitting the link:

Anyone’s got some hints on how to figure out the server connect routing for PHP devs? :innocent:
We’re done with our two-sided platform, launching in March. Google connect is the last little perk we’d like for our users. Thanksss

Open your server action in the code editor and check if you see anything like "jwt_bearer": "jwt", in the options. If yes, set this to "jwt_bearer": false,

No such thing in the options of the file.

So you checked that in code view?

Yes right there:
image

image

image

Etc, etc…

Can you please do a search for jwt in your server action?

image

No… I am only asking you to do a simple search in the server action listed in your error message.

I did that search for jwt, for bearer and for option in dmxConnect/api/Admin/userLoginGoogle.php. Nothing for jwt and bearer.

Please advise status: any quick fix possible on my end or a fix coming in next update?

In your search results it seems that the name of your JWT Signing is jwt2 while in the jwt_bearer it points to jwt. Change the jwt_bearer option on the oauth2 module to jwt2 or change the name on the jwt module to jwt.

Thanks but still getting the exact same error message. Excerpt:

/dmxConnectLib/lib/oauth/Oauth2.php",“line”:167,“message”:“Undefined index: jwt”,“trace”:"#0

I remain confused abt this jwt matter as I’ve followed the google and facebook oauth2 connect tutorials and none mentions a jwt setup. Why is there a jwt_bearer?

The jwt_bearer is required for google service accounts.

Here a small update where I have added some extra checks to prevent php errors.

Oauth2.zip (3.3 KB) Unzip to dmxConnectLib/lib/oauth.

Good to know. So what would the jwt setup be there?

Will install the file and report, thanks.

GET error 500:

So I’ll await your update guys on the right jwt setup. Thanks.

The jwt is only needed for google service accounts, depending on which api you try to access you will need it or not.

With the new php it should prevent that error, are you sure you’ve uploaded it to the server?

Yes I did upload the new oauth2.php file to the server.
I’m trying to setup a oauth login with google account. Shall I use these jwt settings:

You have to check with the google documentation which credentials you require for the specific API you are using. Some APIs require it and some not. When you want to access some personal data like from google drive or gmail then you don’t use the service account but the personal account which doesn’t require the jwt.