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

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.

User avatar
a.gneady
Site Admin
Posts: 1281
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: AppGini plugins to add more power to your apps:
  • DataTalk is an innovative AppGini plugin based on ChatGPT that allows you to interact with your AppGini database using natural language questions, without writing any SQL. Check the demo video
  • Mass Update plugin: Update multiple records at once and improve your workflow efficiency.
  • Check our other plugins and get a generous discount of up to 30% when buying 2 or more plugins.

bescott53

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

Post Reply