1084

live server login in admin panel redirect base url

Comments for “live server login in admin panel redirect base url”
 

Posted by investobd on Tuesday 15th February 2022 at 09:36 GMT

Dear Trongatre, Good day.
log in in to live server admin panel its redirect me to base url . is there any one face this problem like me . i try many way find out the problem but not figure out it. please help or make some video for live server configuration.

investobd

User Level: Guest

Date Joined: 10/12/2021

Posted by djnordeen on Tuesday 15th February 2022 at 11:38 GMT

Have you looked at this in the Docs under Before you Launch at the bottom of the Docs?
https://trongate.io/docs_m/information/hiding-your-admin-login-url

The next page talks about setting your app from Dev to Prod
https://trongate.io/docs_m/information/pre-launch-checklist

Look at the trongate_administrators module
Search for the function submit_login. // line 37
I think the problem is where the redirect is coming from. // line 50

Dan
Early Adopter

djnordeen

User Level: Early Adopter

Date Joined: 20/08/2021

Posted by investobd on Wednesday 16th February 2022 at 05:47 GMT

Sorry to bother Trongate,
I read the doc but
stile have some problem , if i change _make_sure_allowed method ENV= live , its work for login , but when i logout its not work the token is not destroy. and also the submit_login form validation not working.

This comment was edited by investobd on Wednesday 16th February 2022 at 07:01 GMT

investobd

User Level: Guest

Date Joined: 10/12/2021

Posted by investobd on Wednesday 16th February 2022 at 08:56 GMT

hello good day,
if i use [define('BASE_URL', 'https://domain.com');] it call the controller as domain.comcontroller. there is no slash , if i use [define('BASE_URL', 'https://domain.com/');] then it work fine , but the form submit not working and redirect base_url.
please help...

investobd

User Level: Guest

Date Joined: 10/12/2021

Posted by djnordeen on Wednesday 16th February 2022 at 12:27 GMT

Ok.
Try placing the following at different points in your code to follow the logic.

    function logout() {
json($data, true);
        $this->module('trongate_tokens');
        $this->trongate_tokens->_destroy();

        if (isset($this->secret_login_segment)) {
            redirect(BASE_URL);
        } else {
            redirect('trongate_administrators/login');
        }
    }


This will show you the data and help with the logic flow.
Move this code down one line at a time and see where what the data is at the various lines
See, where you are at the above if statement, This will tell you what the secret_login_segment is set to.

Without seeing you code, you just have to keep placing the json statement and see where it goes.
Hope this helps, Dan
Early Adopter

djnordeen

User Level: Early Adopter

Date Joined: 20/08/2021

Posted by investobd on Thursday 17th February 2022 at 07:11 GMT

Hello Trongate, Good day.
In live server . I will try many way to figure out. but it not solve. when i submit the form its not working. its redirect me base_url, I call any method in manual its work. but when submit the form the form_location not tiger and its redirect me in base_url.

investobd

User Level: Guest

Date Joined: 10/12/2021

Posted by mirandakimel on Thursday 17th February 2022 at 10:30 GMT

Trongate form submission requires a unique CSRF token to be passed through the form and validated on page load. Is it possible that your setup is unable to set sessions/cookies that might cause form validation failure? I seem to recall that the result of a failed form validation is a silent redirect to the homepage.

mirandakimel

User Level: Guest

Date Joined: 8/07/2021

Posted by investobd on Thursday 17th February 2022 at 11:41 GMT

Thanks to you very much D3mon,
Its work... its cookies issue.
Again thanks to you and have a good day.

investobd

User Level: Guest

Date Joined: 10/12/2021

Posted by D3mon on Thursday 17th February 2022 at 12:23 GMT

Thanks investobd, glad it's worked out for you.

This comment was edited by D3mon on Thursday 17th February 2022 at 12:23 GMT

Level One Member

D3mon

User Level: Level One Member

Date Joined: 6/07/2021

×