PHP error with oauth2

That part of google docs is a maze, I’ll have to give up alas, unless @mebeingken has a video that we can access (and pay for it) even if slightly out dated, at least I’ll get an idea of the flow of steps for a google sign-in.

I was told by a google oauth expert that when user is prompted for an access approval by us, there is no need for service account. So I’ve removed jwt signing in the globals.
And I’ve set this in the oauth2 provider file: "jwt_bearer": "false",
image

Now I get 500 error: "message":"Undefined index: false", from line 167 of your oauth2.php file.
image
Does it require a fix or a different setup?

Remove the option completely, setting it to "false" it sees it as being set.

Thank you!! I have my google prompt now. You can fix your wappler files.

EDIT: I will try to find and share the right, up-to-date Google oauth2 API url, current one shared in tutorial does not return first and last names.

1 Like

Can you please share an updated Google Authentication for wappler please.
I still can’t make mine to work based on the forum tutorial.

Ok, sharing the main steps, assuming you’ve done the Google Cloud setup already.

In the Globals, have the jwt setup, after you do the right setup on your Google Cloud Services:

Value in the Claims section:
https://www.googleapis.com/oauth2/v2/userinfo
image

In the oauth of Globals:

Create an API action with the following flow (it’s based on an existing forum tutorial):

URL: https://people.googleapis.com/v1/people/me

Hope this helps.

Hi, thanks for the details but where can I find the “Issuer”, “audience” and “Key” for the JWT inputs.

1 Like

My bad, sorry, have done this setup months ago and don’t remember all the details, you don’t need JWT, only oauth:
image

Hi, so should I follow only from the OAuth2 step !?
I am trying to create a log in using google and can’t find a way for months now :frowning: followed all forum tutorials on the subject and can’t find a clean straight fwrd follow through tutorial that works.
Any help would be very appreciated.

Yes.

I’ve followed this tutorial


…and made some fixes (as per my sharing above)

I followed that one and it gives me this error :

Are you using a custom db query in your server action?

How is your join set up exactly - please post a screenshot? Also how did you manage to create a db query using a basic license?

I followed these steps : Using OAuth2 Connector with Google

As i already asked:

Sorry but I am not very experienced with the nomenclature experienced people use,
this is workflow:

In the query builder you have set up a database tables join. How did you set it up? Open the join editor and just make a screenshot of how is it set up!

Why did you join the table with itself then? What are you trying to do here?

I doubt you need this join here, and the error you pasted above is related to this query.