How to pass login credentias?

Hello,

I’m running a web application in a local environment with Apache, PHP and MySQL, when I open the application from Pinegrow it shows me the login page of the application, but it does not allow me to edit other pages since it asks for user credentials and password and Shows me the message Invalid use of your user ID.

How to pass user and password?

How to continue to other pages? How to pass user and password and click to redirect to other pages?

1 Like

@lexcorp if it’s a local environment can you just remove the code that requires login authentication and then it would allow you to access pages.

The suggestion @Rob gave is good. I developed a custom CMS and created a switch that allows me to put the site into “debug mode” which disables the credential requirements for the pages.

Another thing you can do is just use your web browser and save the pages out and then load those into Pinegrow directly.

I have done both of these and it works for me in my process. I also am using a custom Apache, MySQL, PHP development environment. Not WAMP or other prepackaged environments. Using Pinegrow with it is really nice.

1 Like

@Terry44 I like the idea of a switch to allow you to debug.

Agree with @Terry44, with one little change-up…
Rather than remove the login code (potentially dangerous if that leaked to production):

  • in your dev site’s .htaccess (or similar), set an Environment Variable for APP_ENV="dev" (in .htaccess, this is SetEnv APP_ENV "dev")
  • in your app, provide the code that handles something along the lines of:
let dev = getenvironmentvariable('APP_ENV');
if(dev){//set authentication without showing the login form}
else{//show the login form}

This is a little more secure than pruning and adding-back the login form, and it opens you up to do a lot of other environment-specific stuff (custom configs, custom behaviors, etc…)

1 Like

Edit: Apologies for bumping such an old topic. Didn’t want to duplicate what already existed.

This would be a great feature. I’m primarily a backend developer and build applications with fairly elaborate authorization and authentication functionality. Disabling the security (even in a local environment) is a big undertaking.

Would be great if we could browse through sites via Pinegrow to get directly to pages we need to modify. Of course we can visit the site and save pages local. Would be nice not having to leave Pinegrow when I just need to modify a secured area.

1 Like