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
bescott53
Veteran Member
Posts: 118
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
a.gneady
Site Admin
Posts: 962
Joined: 2012-09-27 14:46
Contact:

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

<script>
    $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'));
    })
</script>
:idea: Learn all the tips and tricks of customizing AppGini apps through our online course.

:arrow: Summary Reports plugin enables you to build powerful reports and charts inside your AppGini application through a few simple steps. See the big picture and discover trends in your data that empower you to take the right decisions confidently.

:arrow: Search Page Maker enables you to build user-friendly yet powerful search pages for your AppGini application by simply dragging and dropping the fields you want to include in search.

bescott53
Veteran Member
Posts: 118
Joined: 2013-02-24 00:13

Re: login in to two appgini applications only once

Post by bescott53 » 2018-11-23 11:02

Thanks Ahmad, I will check this and report back to you
Appgini 5.72

Post Reply