Cloudron makes it easy to run web apps like WordPress, Nextcloud, GitLab on your server. Find out more or install now.


Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Bookmarks
  • Search
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Brand Logo

Cloudron Forum

Apps | Demo | Docs | Install
  1. Cloudron Forum
  2. MiroTalk
  3. Email as default username since update to new config set-up is NOT great :)

Email as default username since update to new config set-up is NOT great :)

Scheduled Pinned Locked Moved Solved MiroTalk
40 Posts 7 Posters 357 Views 7 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • jamesJ james

    @avatar1024 said in Email as default username since update to new config set-up is NOT great πŸ™‚:

    One thing I have noticed since the update is that we now have access to 4 files from the file manager, three secret and the env file, but we don't have the config.js file which contains all defaults values so I can't see if there is something wrong there.

    This sentence leads me to believe that the update notice was not understood.

    From the update notice

    Package has moved to configuration via environment variables instead of config.js

    The old config.js file is saved as /app/data/config-legacy.js . You can view this using the File manager. Manually migration the settings into /app/data/env

    In other words:

    The config.js is no longer used.
    You will not find it or be able to configure anything via that file.
    If you wish to migrate these settings, we stored the file in /app/data/config-legacy.js.
    Please view and do all configuration in /app/data/env.
    All config options can be found here https://github.com/miroslavpejic85/mirotalksfu/blob/main/.env.template


    Regarding the display option, maybe @mirotalk-57bab571 can shed some light into this issue.

    avatar1024A Offline
    avatar1024A Offline
    avatar1024
    wrote last edited by avatar1024
    #7

    @james said in Email as default username since update to new config set-up is NOT great πŸ™‚:

    This sentence leads me to believe that the update notice was not understood.

    This is getting difficult. The update notice was well understood. I know that if I want to move away from the defaults, i.e. change a specific setting, then we now only use the env file, where settings in there override the defaults. Yet MiroTalk itself still uses a config.js for all default values as indicated at the top of this file: https://github.com/miroslavpejic85/mirotalksfu/blob/main/.env.template.

    # ====================================================
    # MiroTalk SFU - Environment Configuration
    # ====================================================
    
    # config.js - Main configuration with:
    # - All default values and documentation
    # - Complex logic and validations
    # - Safe to commit to version control
    #
    # .env - Environment overrides with:
    # - Secrets and sensitive data (NEVER commit)
    # - Environment-specific settings
    # - Simple key=value format
    

    So what I meant in my comment is that, given we now cannot see the config.js file (which makes sense cause theoretically useless to users), I cannot check whether there is in issue with the default values in there that ship with the package, only you / @staff can check that.

    1 Reply Last reply
    2
    • MiroTalkM Offline
      MiroTalkM Offline
      MiroTalk
      wrote last edited by MiroTalk
      #8

      By default, when entering a room, the username for OIDC-authenticated users is set to their full email address.

      If you prefer to display the user's name instead of their email (which is often more appropriate for meetings), update the config.js file by setting the following:

      oidc: {
          // ...
          peer_name: {
              force: true,
              email: false, // --> set to false
              name: true, // --> display the user's name from OIDC instead of their email
          },
          // ...
      }
      

      Note: Using the full email as a username is not always ideal and, until now, MiroTalk limited it to 30 characters.

      This limit has now been increased to 254 characters to fully support long email addresses and 32 chars for username.

      1 Reply Last reply
      3
      • avatar1024A Offline
        avatar1024A Offline
        avatar1024
        wrote last edited by avatar1024
        #9

        I've installed another instance of the app on a totally difference server and the issue is there too. The issue is that somehow username = email address and display name = username. But also display name is not even editable when trying to join the room. I think the most natural default behaviour should be display name = full name.

        @mirotalk-57bab571 Thank you for you're reply, I've just seen it as I was typing this. Does the change you suggest have to be done in the config.js file or can it be done in the env file? Also is it possible to make the name editable (say for some meeting I might want to add info next to my name, e.g. pronoun, company name, etc.)?

        MiroTalkM 1 Reply Last reply
        1
        • avatar1024A avatar1024

          I've installed another instance of the app on a totally difference server and the issue is there too. The issue is that somehow username = email address and display name = username. But also display name is not even editable when trying to join the room. I think the most natural default behaviour should be display name = full name.

          @mirotalk-57bab571 Thank you for you're reply, I've just seen it as I was typing this. Does the change you suggest have to be done in the config.js file or can it be done in the env file? Also is it possible to make the name editable (say for some meeting I might want to add info next to my name, e.g. pronoun, company name, etc.)?

          MiroTalkM Offline
          MiroTalkM Offline
          MiroTalk
          wrote last edited by MiroTalk
          #10

          @avatar1024 said in Email as default username since update to new config set-up is NOT great πŸ™‚:

          @mirotalk-57bab571 Thank you for you're reply, I've just seen it as I was typing this. Does the change you suggest have to be done in the config.js file or can it be done in the env file?

          Don't worry πŸ˜‰

          These changes must be made in the config.js file.

          But also display name is not even editable when trying to join the room.

          If you prefer to let users manually enter their username before joining a roomβ€”even when OIDC is enabledβ€”set force to false in the oidc.peer_name configuration:

          oidc: {
              // ...
              peer_name: {
                  force: false, // Allow manual username entry
                  email: false,
                  name: true,
              },
              // ...
          }
          

          This allows users to input their name instead of automatically using the one provided by the OIDC provider.

          Remember: You also need to restart the MiroTalk SFU instance for the changes to take effect.

          1 Reply Last reply
          1
          • avatar1024A Offline
            avatar1024A Offline
            avatar1024
            wrote last edited by avatar1024
            #11

            @MiroTalk said in Email as default username since update to new config set-up is NOT great πŸ™‚:

            If you prefer to let users manually enter their username before joining a roomβ€”even when OIDC is enabledβ€”set force to false in the oidc.peer_name configuration

            @mirotalk-57bab571 Snap again! I've just added that question (again) to my previous message which you have magically answered before having even seen it πŸ™‚ Thank you, all very clear!!

            @staff given some changes can only be done through the config.js file, do you think it would make sense to still expose this file in the file manager?

            MiroTalkM 1 Reply Last reply
            2
            • avatar1024A avatar1024

              @MiroTalk said in Email as default username since update to new config set-up is NOT great πŸ™‚:

              If you prefer to let users manually enter their username before joining a roomβ€”even when OIDC is enabledβ€”set force to false in the oidc.peer_name configuration

              @mirotalk-57bab571 Snap again! I've just added that question (again) to my previous message which you have magically answered before having even seen it πŸ™‚ Thank you, all very clear!!

              @staff given some changes can only be done through the config.js file, do you think it would make sense to still expose this file in the file manager?

              MiroTalkM Offline
              MiroTalkM Offline
              MiroTalk
              wrote last edited by MiroTalk
              #12

              @avatar1024 said in Email as default username since update to new config set-up is NOT great πŸ™‚:

              do you think it would make sense to still expose this file in the file manager?

              I recently created MiroTalk Admin, tailored specifically for MiroTalk projects (SFU/P2P/C2C/BRO/WEB). πŸ™‚

              01-mirotalk-admin-projects.png

              The Dashboard UI allows you to easily edit both the .env file and the config.js file as needed.

              06-mirotalk-sfu-config.png

              05-mirotalk-sfu-env.png

              GitHub Repo: https://github.com/miroslavpejic85/mirotalk-admin

              avatar1024A 1 Reply Last reply
              3
              • MiroTalkM MiroTalk

                @avatar1024 said in Email as default username since update to new config set-up is NOT great πŸ™‚:

                do you think it would make sense to still expose this file in the file manager?

                I recently created MiroTalk Admin, tailored specifically for MiroTalk projects (SFU/P2P/C2C/BRO/WEB). πŸ™‚

                01-mirotalk-admin-projects.png

                The Dashboard UI allows you to easily edit both the .env file and the config.js file as needed.

                06-mirotalk-sfu-config.png

                05-mirotalk-sfu-env.png

                GitHub Repo: https://github.com/miroslavpejic85/mirotalk-admin

                avatar1024A Offline
                avatar1024A Offline
                avatar1024
                wrote last edited by avatar1024
                #13

                @MiroTalk Looks great! Actually I had just seen this earlier today in your discord channel! I didn't think it'd come handy that quickly for my use case though πŸ˜‰

                I guess this will have to be packaged somehow so it integrates with the MiroTalk apps on Cloudron?

                MiroTalkM 1 Reply Last reply
                1
                • avatar1024A avatar1024

                  @MiroTalk Looks great! Actually I had just seen this earlier today in your discord channel! I didn't think it'd come handy that quickly for my use case though πŸ˜‰

                  I guess this will have to be packaged somehow so it integrates with the MiroTalk apps on Cloudron?

                  MiroTalkM Offline
                  MiroTalkM Offline
                  MiroTalk
                  wrote last edited by MiroTalk
                  #14

                  @avatar1024 said in Email as default username since update to new config set-up is NOT great πŸ™‚:

                  Looks great! Actually I had just seen this earlier today in your discord channel! I didn't think it'd come handy that quickly for my use case though

                  Thank you!

                  You can also use MiroTalk Admin directly from your local PC by adding your server’s SSH credentials to the .env file.
                  Then, simply edit the backend/config.index.js file (see the APP_CONFIG section) to configure it for MiroTalk SFU, or other variants.

                  I've been using it myself for several days to manage and update my demo instances β€” and so far, it's working great!

                  avatar1024A 1 Reply Last reply
                  2
                  • MiroTalkM MiroTalk

                    @avatar1024 said in Email as default username since update to new config set-up is NOT great πŸ™‚:

                    Looks great! Actually I had just seen this earlier today in your discord channel! I didn't think it'd come handy that quickly for my use case though

                    Thank you!

                    You can also use MiroTalk Admin directly from your local PC by adding your server’s SSH credentials to the .env file.
                    Then, simply edit the backend/config.index.js file (see the APP_CONFIG section) to configure it for MiroTalk SFU, or other variants.

                    I've been using it myself for several days to manage and update my demo instances β€” and so far, it's working great!

                    avatar1024A Offline
                    avatar1024A Offline
                    avatar1024
                    wrote last edited by avatar1024
                    #15

                    @MiroTalk said in Email as default username since update to new config set-up is NOT great πŸ™‚:

                    I've been using it myself for several days to manage and update my demo instances

                    Amazing! Just to make sure, do you mean your demo instances also hosted on Cloudron? I'm asking because I fear the apps are more isolated using Cloudron than if installed directly as docker containers. For e.g. we don't easily access the config.index.js file on Cloudron (app packages are read only and get overridden with each updates AFAIK).

                    Maybe that's one for @staff to look into?

                    MiroTalkM 1 Reply Last reply
                    1
                    • avatar1024A avatar1024

                      @MiroTalk said in Email as default username since update to new config set-up is NOT great πŸ™‚:

                      I've been using it myself for several days to manage and update my demo instances

                      Amazing! Just to make sure, do you mean your demo instances also hosted on Cloudron? I'm asking because I fear the apps are more isolated using Cloudron than if installed directly as docker containers. For e.g. we don't easily access the config.index.js file on Cloudron (app packages are read only and get overridden with each updates AFAIK).

                      Maybe that's one for @staff to look into?

                      MiroTalkM Offline
                      MiroTalkM Offline
                      MiroTalk
                      wrote last edited by MiroTalk
                      #16

                      @avatar1024 said in Email as default username since update to new config set-up is NOT great πŸ™‚:

                      Amazing! Just to make sure, do you mean your demo instances also hosted on Cloudron?

                      No, our official live demo is hosted on a Hetzner VPS.

                      I also have a self-hosted version of Cloudron. From what I can see, using the File Manager, you can edit both the .env and config.js files to tailor the setup to your needs.

                      env-config.png

                      avatar1024A 1 Reply Last reply
                      1
                      • MiroTalkM MiroTalk

                        @avatar1024 said in Email as default username since update to new config set-up is NOT great πŸ™‚:

                        Amazing! Just to make sure, do you mean your demo instances also hosted on Cloudron?

                        No, our official live demo is hosted on a Hetzner VPS.

                        I also have a self-hosted version of Cloudron. From what I can see, using the File Manager, you can edit both the .env and config.js files to tailor the setup to your needs.

                        env-config.png

                        avatar1024A Offline
                        avatar1024A Offline
                        avatar1024
                        wrote last edited by avatar1024
                        #17

                        @MiroTalk said in Email as default username since update to new config set-up is NOT great πŸ™‚:

                        From what I can see, using the File Manager, you can edit both the .env and config.js files to tailor the setup to your needs.

                        You can see the config-lagacy.js because your instance was upgraded from a previous version. The file is there just so you can see your old config and migrate them using the env file, but the config-lagacy.js file itself is not used by the app. On a fresh install of the app this file is not there. Just as a test/try I have manually created a config.js file in that directory and added the lines you mentioned:

                        oidc: {
                            // ...
                            peer_name: {
                                force: true,
                                email: false, // --> set to false
                                name: true, // --> display the user's name from OIDC instead of their email
                            },
                            // ...
                        }
                        

                        ...but this has no effect.

                        MiroTalkM 1 Reply Last reply
                        1
                        • avatar1024A avatar1024

                          @MiroTalk said in Email as default username since update to new config set-up is NOT great πŸ™‚:

                          From what I can see, using the File Manager, you can edit both the .env and config.js files to tailor the setup to your needs.

                          You can see the config-lagacy.js because your instance was upgraded from a previous version. The file is there just so you can see your old config and migrate them using the env file, but the config-lagacy.js file itself is not used by the app. On a fresh install of the app this file is not there. Just as a test/try I have manually created a config.js file in that directory and added the lines you mentioned:

                          oidc: {
                              // ...
                              peer_name: {
                                  force: true,
                                  email: false, // --> set to false
                                  name: true, // --> display the user's name from OIDC instead of their email
                              },
                              // ...
                          }
                          

                          ...but this has no effect.

                          MiroTalkM Offline
                          MiroTalkM Offline
                          MiroTalk
                          wrote last edited by MiroTalk
                          #18

                          @avatar1024 said in Email as default username since update to new config set-up is NOT great πŸ™‚:

                          You can see the config-lagacy.js because your instance was upgraded from a previous version. The file is there just so you can see your old config and migrate them using the env file, but the config-lagacy.js file itself is not used by the app.

                          OK, I think I understand the issue now. Cloudron retains the upstream config.js file as the default. To make changes, you're expected to use only the .env file. However, not all configuration options are currently supported there. For instance, setting the displayed username when OIDC is enabled can only be configured in config.js for now.

                          To address the issue with the OIDC display name, I need to make it configurable via the .env file.

                          avatar1024A 1 Reply Last reply
                          3
                          • MiroTalkM MiroTalk

                            @avatar1024 said in Email as default username since update to new config set-up is NOT great πŸ™‚:

                            You can see the config-lagacy.js because your instance was upgraded from a previous version. The file is there just so you can see your old config and migrate them using the env file, but the config-lagacy.js file itself is not used by the app.

                            OK, I think I understand the issue now. Cloudron retains the upstream config.js file as the default. To make changes, you're expected to use only the .env file. However, not all configuration options are currently supported there. For instance, setting the displayed username when OIDC is enabled can only be configured in config.js for now.

                            To address the issue with the OIDC display name, I need to make it configurable via the .env file.

                            avatar1024A Offline
                            avatar1024A Offline
                            avatar1024
                            wrote last edited by avatar1024
                            #19

                            @MiroTalk said in Email as default username since update to new config set-up is NOT great πŸ™‚:

                            OK, I think I understand the issue now. Cloudron retains the upstream config.js file as the default. To make changes, you're expected to use only the .env file. However, not all configuration options are currently supported there. For instance, setting the displayed username when OIDC is enabled can only be configured in config.js for now.

                            Exactly!

                            @MiroTalk said in Email as default username since update to new config set-up is NOT great πŸ™‚:

                            To address the issue with the OIDC display name, I need to make it configurable via the .env file.

                            If you could that's great. Otherwise perhaps @staff can allow changes to config.js file again. I think they understood that in your new approach to configuration (since MiroTalk SFU 1.8.0), changes by users should only be made via the .env file, and that editing the config.js would never be needed.

                            1 Reply Last reply
                            2
                            • MiroTalkM Offline
                              MiroTalkM Offline
                              MiroTalk
                              wrote last edited by MiroTalk
                              #20

                              Coming in MiroTalk SFU v1.8.57
                              You’ll be able to configure the OIDC username behavior directly from your .env file. Simply add or update the following entries:

                              OIDC_FORCE_USERNAME=false
                              OIDC_EMAIL_AS_USERNAME=false
                              OIDC_NAME_AS_USERNAME=true
                              

                              These settings give you full control over how usernames are derived from the OIDC provider, but allowing you to edit before join room.

                              Cheers,
                              Miroslav

                              avatar1024A 1 Reply Last reply
                              4
                              • MiroTalkM MiroTalk

                                Coming in MiroTalk SFU v1.8.57
                                You’ll be able to configure the OIDC username behavior directly from your .env file. Simply add or update the following entries:

                                OIDC_FORCE_USERNAME=false
                                OIDC_EMAIL_AS_USERNAME=false
                                OIDC_NAME_AS_USERNAME=true
                                

                                These settings give you full control over how usernames are derived from the OIDC provider, but allowing you to edit before join room.

                                Cheers,
                                Miroslav

                                avatar1024A Offline
                                avatar1024A Offline
                                avatar1024
                                wrote last edited by avatar1024
                                #21

                                @MiroTalk Amazing, thank you so much for your engagement here and for such a swift fix!

                                Cheers

                                Gauthier

                                MiroTalkM 1 Reply Last reply
                                2
                                • avatar1024A avatar1024

                                  @MiroTalk Amazing, thank you so much for your engagement here and for such a swift fix!

                                  Cheers

                                  Gauthier

                                  MiroTalkM Offline
                                  MiroTalkM Offline
                                  MiroTalk
                                  wrote last edited by
                                  #22

                                  @avatar1024 You're very welcome!
                                  I just fixed the typoβ€”see my previous message.

                                  Time to get some sleep now, it's pretty late here 😴
                                  Thanks again for using MiroTalk, and have a great night! πŸŒ™

                                  1 Reply Last reply
                                  3
                                  • avatar1024A Offline
                                    avatar1024A Offline
                                    avatar1024
                                    wrote last edited by avatar1024
                                    #23

                                    @staff Thanks for pushing the update that quickly. In addition (maybe next time you push an update) I would suggest making the suggested changes in the .env file so that by default (i.e. on the fresh install of the package) the OIDC behaviour is to use name instead of email as display name and allow display name editing.

                                    1 Reply Last reply
                                    1
                                    • avatar1024A Offline
                                      avatar1024A Offline
                                      avatar1024
                                      wrote last edited by avatar1024
                                      #24

                                      Unfortunately something isn't working...

                                      I have made the changes so my env file looks like that (first 5 lines are there by default):

                                      All config options at https://github.com/miroslavpejic85/mirotalksfu/blob/main/.env.template
                                      
                                      PRESENTERS=admin@cloudron.local
                                      EMAIL_SEND_TO=admin@cloudron.local
                                      STATS_ENABLED=false
                                      
                                      OIDC_FORCE_USERNAME=false
                                      OIDC_EMAIL_AS_USERNAME=false
                                      OIDC_NAME_AS_USERNAME=true
                                      

                                      I have restarted the app, cleared browser's cache, but I still have the same behaviour.

                                      Either something in the changes @mirotalk-57bab571 made didn't work, or another thing I noticed is that in Cloudron package the file is called env and not .env. When I rename env to .env and restart the app, a new env file is automatically created, and it still doesn't work. @staff?

                                      1 Reply Last reply
                                      2
                                      • jamesJ Online
                                        jamesJ Online
                                        james
                                        Staff
                                        wrote last edited by
                                        #25

                                        Hello @avatar1024
                                        I am taking a look right now.
                                        The file name /app/data/env is correct. If that file is missing, it will be created again.
                                        Since you moved the file from env to .env the file was missing and got created again.

                                        I am now trying to reproduce your issue with the latest version.

                                        1 Reply Last reply
                                        1
                                        • jamesJ Online
                                          jamesJ Online
                                          james
                                          Staff
                                          wrote last edited by
                                          #26

                                          I can confirm this seems to have no impact.
                                          Added the following lines to /app/data/env

                                          OIDC_FORCE_USERNAME=false
                                          OIDC_EMAIL_AS_USERNAME=false
                                          OIDC_NAME_AS_USERNAME=true
                                          

                                          Cloudron writes this to /run/mirotalksfu/env and /run/mirotalksfu/env is symlinked to /app/code/.env.
                                          So everything in that /app/data/env => /run/mirotalksfu/env => /app/code/.env is loaded, otherwise all the other settings would be missing.

                                          But now when checking the /app/code/app/src/config.js I see:

                                          peer_name: {
                                                          force: process.env.OIDC_USERNAME_FORCE !== 'false', // Require identity provider authentication
                                                          email: process.env.OIDC_USERNAME_AS_EMAIL !== 'false', // Request email claim
                                                          name: process.env.OIDC_USERNAME_AS_NAME === 'true', // Don't require full name
                                                      }
                                          

                                          So from that I can conclude the env vars should be:

                                          OIDC_USERNAME_FORCE=false
                                          OIDC_USERNAME_AS_EMAIL=false
                                          OIDC_USERNAME_AS_NAME=true
                                          

                                          This now had the desired effect.

                                          I assume what @mirotalk-57bab571 wrote https://forum.cloudron.io/post/107999 was simply a typo or first draft of that variable names.


                                          Solution

                                          Use the following variables in /app/data/env

                                          OIDC_USERNAME_FORCE=false
                                          OIDC_USERNAME_AS_EMAIL=false
                                          OIDC_USERNAME_AS_NAME=true
                                          
                                          avatar1024A MiroTalkM 3 Replies Last reply
                                          4
                                          Reply
                                          • Reply as topic
                                          Log in to reply
                                          • Oldest to Newest
                                          • Newest to Oldest
                                          • Most Votes


                                          • Login

                                          • Don't have an account? Register

                                          • Login or register to search.
                                          • First post
                                            Last post
                                          0
                                          • Categories
                                          • Recent
                                          • Tags
                                          • Popular
                                          • Bookmarks
                                          • Search