Giter VIP home page Giter VIP logo

Comments (5)

evansims avatar evansims commented on June 12, 2024 1

Maybe on v5 I don't need to use the "Custon database" configuration. As I started using Auth0 on v4.1, this was required at that time.
Can you confirm this?

Ah, gotcha, thanks for clarifying — no, v5 does not require any special custom database configuration, and I would expect having such will almost certainly break things. Thanks for raising that, I'll add it to the documentation.

from wordpress.

bruno-barros avatar bruno-barros commented on June 12, 2024

I can not find any reference on the Auth0 plugin to the action /index.php?a0_action=migration-ws-get-user.
Is it required to the sing up process?

from wordpress.

bruno-barros avatar bruno-barros commented on June 12, 2024

Maybe I'm getting too far on this, but I implemented a function to respond properly when Auth0 call the site with the a0_action argument.

if(isset($_GET['a0_action']) && $_GET['a0_action'] == 'migration-ws-get-user'){
     $this->migrateUser();
}

Then I just respond with a proper JSON to do not break the Auth0 connection with my custom database.
Probably I'm doing unessessary work, but as I have an old Auth0 configuration and the plugin do not respond on this Auth0 request, this did the job.

from wordpress.

evansims avatar evansims commented on June 12, 2024

Hi @bruno-barros,

After migrating to verision 5.0 I'm unable to register/create a new user. O Auth0 logs panel a see the error "Unexpected token < in JSON at position 0".

Where exactly are you seeing this error? Please walk me through what are you attempting to do when it occurs.

Could it be related to the "Database Action Scripts"?

I don't follow, can you clarify what you mean? Are you referring to Auth0 Actions setup on the service side?

On the Auth0 panel I get the same error trying out the scripts for login and getUser.

Do you mean the error is displayed inside the WordPress admin dashboard, or your Auth0 management log? What scripts are you referring to? v5 does not have a log panel in the WordPress admin dashboard.

I can not find any reference on the Auth0 plugin to the action /index.php?a0_action=migration-ws-get-user.

"a0_action" is a v4 API, and wouldn't have any relevance to v5. It isn't supported by v5. Can you clarify what your environment is set up with right now, v4 or v5?

from wordpress.

bruno-barros avatar bruno-barros commented on June 12, 2024

Hi @evansims hummmm ok. I'm starting to see the problem here.
On the Auth0 admin panel: "Authentication > Database > Custom database > Database Action Scripts" there are two javascript snipets. One to log user in and the second to get user data from the site database.
You just said that "a0_action" is deprecated on v5, but as I have these scripts running on the Auth0 panel, every time an user try to login in or sign up these scripts runs sending a request to the site backend.
If these request do not respond with a proper valid JSON the Auth0 sign up just fails.

// Auth0 log
{
  "date": "2024-01-08T23:29:37.304Z",
  "type": "fs",
  "description": "Unexpected token < in JSON at position 0",
  "connection": "db-abs-rio-production",
  "connection_id": "con_4UoJUe7byuiyyAkWcf",
  "client_id": "0w3--------------------oZ",
  "client_name": "ABS-Rio",
  "ip": "2804:1b3:6d03:814a:9525:73c3:3378:b54f",
  "user_agent": "Chrome 120.0.0 / Windows 10.0.0",
  ...
}

Maybe on v5 I don't need to use the "Custon database" configuration. As I started using Auth0 on v4.1, this was required at that time.
Can you confirm this?

Your responses:

Where exactly are you seeing this error? Please walk me through what are you attempting to do when it occurs.

This error I can see on Auth0 logs and on the Custom Database panel were there is a button to try the connection out.

Do you mean the error is displayed inside the WordPress admin dashboard, or your Auth0 management log? What scripts are you referring to? v5 does not have a log panel in the WordPress admin dashboard.

All the errors appears on Auth0 Logs.

"a0_action" is a v4 API, and wouldn't have any relevance to v5. It isn't supported by v5. Can you clarify what your environment is set up with right now, v4 or v5?

As I said, I was on v4 and migrated to v5. Now I see that I'm using a feature of v4 but with the code of v5. Because of that a needed to respond the request with "a0_action" argument.

Now I'm afraid that a need to disable the "Custom Database" feature on the Auth0 panel.

from wordpress.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.