login in to two appgini applications only once

The recommended method of customizing your AppGini-generated application is through hooks. But sometimes you might need to add functionality not accessible through hooks. You can discuss this here.
Post Reply
Veteran Member
Posts: 92
Joined: 2013-02-24 00:13

login in to two appgini applications only once

Post by bescott53 » 2018-11-08 10:30

hi everyone, i was wondering if anyone else has done this before and can show me how. i have two appgini applications, what i was looking for was someone who was logged into one, could be given a link to go to the other without logging in again separately to the second application? both of them require logins so i cant just leave one open.
Appgini 5.72

User avatar
Site Admin
Posts: 923
Joined: 2012-09-27 14:46

Re: login in to two appgini applications only once

Post by a.gneady » 2018-11-21 13:30

Are both apps on the same domain name? For example, domain.com/app1 and domain.com/app2? If yes, you should give them the same application name (the application name is the name of the top node in the left tree pane in AppGini, see https://cdn.bigprof.com/screencasts/2018-11-21_1521.png ) ... next, you should have a cronjob (scheduled task) for synchronizing the membership_users and membership_groups tables for both databases (so that they share the same usernames and groups) ... Finally, you probably don't want both apps to display the same title (the title is derived by default from the app name you set in AppGini) ... so you could add code for changing the app name in hooks/footer-extras.php like this:

Code: Select all

    $j(function() {
        var oldTitle = $j('.navbar-brand').text();
        var oldHTML = $j('.navbar-brand').html();
        // change app name here
        $j('.navbar-brand').html(oldHTML.replace(oldTitle, ' New App Name'));
AppGini: Responsive, collaborative web db apps in minutes.
:idea: Learn all the tips and tricks of customizing AppGini apps through our online course.

Post Reply