Jump to content

Auth0


goncalogaspar

Recommended Posts

We need to use the Auth0 SDK Classes within a Presta module, and in this module we use an override in some routines of the log file responsible for backoffice (AdminLoginController).

Previously we identified the locations in the code where we should ignore the password and only log in with the email (bypass), located in the Employee class, the AdminLoginController controller, and the AdminController controller. A folder library was created inside the module folder, and all the material of the Auth0 SDK was placed.

The first approach that was most attractive but not effective was to override the AdminLoginController controller inside the module. And in this extended file I can not call the Auth0 SDK classes, I need them to be available as the example below:

image.thumb.png.172c6fada27a9ed1cfc30968e56b0f8b.png

This way I will be able to use these classes in the SSO login method as in the code below:

image.png.6c77019d23900c47b228905a99d7a7c2.png

Will the file that has been overridden can call the libs of the folder that is there in the folder of the module, together of the files of the same, and the file overrided will be in the folder override of the prestashop?

What is the right way to do this kind of development?

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...