PHP error with oauth2

I removed the other two and added only the query for the email with the condition to be equal to the database and now this is the error.

The error is now related to your insert step and the last_updated column …

Please double check if a column named last_updated exists in your users table.

Interesting, I thought it would create a filed if there was not relation !
Thanks, I removed it but now it shows “Unauthorized”

I think I might need to do a “clean install”

Any more updated tutorials I should follow please to avoid wasting your time.

This is the tutorial you need to follow:

Ok, thanks, I will try again…

@Teodor, Hi, I erased all api steps but now when I “open in browser”


on the first api action the result is not the same as in the tutorial !

how can I reset everything to start fresh ?

and I tried to add the official google button from : https://developers.google.com/identity/sign-in/web/build-button

and it does not show any button !

thank you in advance for any help

Do not open in browser, it did not work for me either, it is not for our environment.
Just follow these steps in my answer to the original post: Using OAuth2 Connector with Google
However, make sure to use this URL https://people.googleapis.com/v1/people/me in the API Action properties.

1 Like

Thank you, I was able to generate the code again and add it to the API scheme but when I press login with google :

Looks like you’re using Node? I can’t help with that secretOrPrivateKey issue, sorry.

Have you tested this in a browser, not in Wappler design view?

Hi @Teodor, it happens the same error.
One thing I notice that is different is in the API action there is a “sub” field for the password:

And in mine I don’t have that field in the callback!:

All other steps I could follow and are exactly as in the tutorial.

The secretOrPrivateKey error is from the JWT, did you configure the OAuth provider with JWT?

If you don’t use JWT, but perhaps used it before it is possible that there is some leftover in the action file.

Hi, yes, I tried to follow the Google Service Account Authorization with JWT tutorial and I think there are files that are conflicting.

I tried to remove all files, open a clean folder and clone it again but even so I have the following issue:

Under Globals/Oauth2 right click on google_auth and select Open in Code View. Check if there is an option jwt_bearer, remove that and save the file.

1 Like

There was a “jwt_bearer” and I removed it as requested:

Then I went to the previous step, created a new API action and tried to display in browser again:

Here is my google OAuth 2.0 Client IDs setup:

The main issue started when I tried to follow this tutorial : Google Service Account Authorization with JWT

Remove this comma as well as the code has syntax error:

And never post client secret in public posts in the future as this is a security risk.

1 Like

Thank you for the fast reply and heads up on the pic info.
Now it went to the proper log in… I will continue with the tutorial.

Thank you all for the help, now it goes through but it gets me in a loop when I try to log in.
It does not go to the account page or create a new user I find it strange that the username is connected to the email and not the “google name” and another field for the email itself!