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. Typebot
  3. Native (email) Auth doesn't seem to work out-of-box

Native (email) Auth doesn't seem to work out-of-box

Scheduled Pinned Locked Moved Unsolved Typebot
14 Posts 3 Posters 1.2k Views 3 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.
  • S Offline
    S Offline
    shrey
    wrote on last edited by
    #1

    I tried setting up Typebot on my Cloudron instance yesterday, but couldn't get the native Email auth to work.

    Keep seeing the "Set up one of the Auth Providers" message.

    Configured the following env variables:

    ADMIN_EMAIL
    SMTP_USERNAME		SMTP username
    SMTP_PASSWORD		SMTP password
    SMTP_HOST		SMTP host. (i.e. smtp.host.com)
    SMTP_PORT	25	SMTP port
    NEXT_PUBLIC_SMTP_FROM		From name and email (i.e. 'Typebot Notifications' <notifications@host.com>)
    SMTP_SECURE	false	If true the connection will use TLS when connecting to server. If false (the default) then TLS is used if server supports the STARTTLS extension. In most cases set this value to true if you are connecting to port 465. For port 587 or 25 keep it false
    SMTP_AUTH_DISABLED	false	To disable the authentication by email but still use the provided config for notifications
    

    Then also tried setting these when the above didn't work:

    DATABASE_URL *		The database URL
    ENCRYPTION_SECRET *		A 256-bit key used to encrypt sensitive data. It is strongly recommended to generate a new one. The secret should be the same between builder and viewer.
    NEXTAUTH_URL *		The builder base URL. Should be the publicly accessible URL (i.e. https://typebot.domain.com)
    NEXT_PUBLIC_VIEWER_URL *		The viewer base URL. Should be the publicly accessible URL (i.e. https://bot.domain.com)
    

    Seems like i'm missing something here.

    Kindly advise!

    1 Reply Last reply
    0
    • nebulonN Offline
      nebulonN Offline
      nebulon
      Staff
      wrote on last edited by
      #2

      Are you overwriting any of the SMTP related settings yourself? The defaults should work using the Cloudron email infrastructure. At least the defaults on a new app instance work fine here.

      S 1 Reply Last reply
      0
      • nebulonN nebulon

        Are you overwriting any of the SMTP related settings yourself? The defaults should work using the Cloudron email infrastructure. At least the defaults on a new app instance work fine here.

        S Offline
        S Offline
        shrey
        wrote on last edited by
        #3

        @nebulon

        I tried overwriting the SMTP related settings when the default was not functioning at all.

        1 Reply Last reply
        0
        • S Offline
          S Offline
          shrey
          wrote on last edited by
          #4

          @nebulon
          Just did a fresh install again, which resulted in the same issue:

          image.png

          1 Reply Last reply
          0
          • nebulonN Offline
            nebulonN Offline
            nebulon
            Staff
            wrote on last edited by
            #5

            Did you try to sign up? The auth provider info below is just for authentication not email sending, while email is one possible auth provider apparently, this is not related to the SMTP configs to send email as far as I understand.

            S 2 Replies Last reply
            0
            • nebulonN nebulon

              Did you try to sign up? The auth provider info below is just for authentication not email sending, while email is one possible auth provider apparently, this is not related to the SMTP configs to send email as far as I understand.

              S Offline
              S Offline
              shrey
              wrote on last edited by shrey
              #6

              @nebulon

              This is the sign up page ->

              4efa5407-1d94-484d-90fb-0999aeba4eef-image.png

              1 Reply Last reply
              0
              • nebulonN nebulon

                Did you try to sign up? The auth provider info below is just for authentication not email sending, while email is one possible auth provider apparently, this is not related to the SMTP configs to send email as far as I understand.

                S Offline
                S Offline
                shrey
                wrote on last edited by
                #7

                @nebulon

                So, is the current Typebot app package not functional right now?

                1 Reply Last reply
                0
                • nebulonN Offline
                  nebulonN Offline
                  nebulon
                  Staff
                  wrote on last edited by
                  #8

                  Ah I got now what you meant with the STMP settings. I didn't realize you can use that as the SSO provider in typebot. Well so it appears the optionalSso flag in Cloudron is not correct then, if typebot always requires an auth provider. Looking into this soon.

                  To get going you could install the app with Cloudron SSO so it has at least one setup.

                  1 Reply Last reply
                  0
                  • nebulonN Offline
                    nebulonN Offline
                    nebulon
                    Staff
                    wrote on last edited by
                    #9

                    Oddly enough at least from the docs, the Email settings are used for both auth and transactional emails like notifications https://docs.typebot.io/self-hosting/configuration#email-auth-notifications .... not sure how that makes sense

                    1 Reply Last reply
                    0
                    • nebulonN Offline
                      nebulonN Offline
                      nebulon
                      Staff
                      wrote on last edited by
                      #10

                      So it seems that either we do not allow using external authentication in the app, or we have to rely on the users to setup some external auth provider which is not email. @shrey have you tried any of the others mentioned at https://docs.typebot.io/self-hosting/configuration ?

                      S 1 Reply Last reply
                      0
                      • nebulonN nebulon

                        So it seems that either we do not allow using external authentication in the app, or we have to rely on the users to setup some external auth provider which is not email. @shrey have you tried any of the others mentioned at https://docs.typebot.io/self-hosting/configuration ?

                        S Offline
                        S Offline
                        shrey
                        wrote on last edited by
                        #11

                        @nebulon said in Native (email) Auth doesn't seem to work out-of-box:

                        have you tried any of the others mentioned at https://docs.typebot.io/self-hosting/configuration ?

                        @nebulon Nope, as my current use-case requires the use of email based auth only.

                        1 Reply Last reply
                        0
                        • nebulonN Offline
                          nebulonN Offline
                          nebulon
                          Staff
                          wrote on last edited by nebulon
                          #12

                          So if your auth provider is required to some SMTP server, then I guess this can't work if our packaging code also sets up SMTP for transactional emails and that always goes to your Cloudron's email server.

                          However given that we source /app/data/env.sh in the start.sh AFTER we setup the SMTP variables, you should be able to overwrite those.

                          I guess then it is a matter of figuring out what the correct env vars for SMTP auth are for typebot, however that is a bit out of scope for Cloudron itself.

                          Edit: while trying your custom settings, I guess also keep an eye on the SMTP server logs itself to get an idea why things may fail

                          S 1 Reply Last reply
                          0
                          • nebulonN nebulon

                            So if your auth provider is required to some SMTP server, then I guess this can't work if our packaging code also sets up SMTP for transactional emails and that always goes to your Cloudron's email server.

                            However given that we source /app/data/env.sh in the start.sh AFTER we setup the SMTP variables, you should be able to overwrite those.

                            I guess then it is a matter of figuring out what the correct env vars for SMTP auth are for typebot, however that is a bit out of scope for Cloudron itself.

                            Edit: while trying your custom settings, I guess also keep an eye on the SMTP server logs itself to get an idea why things may fail

                            S Offline
                            S Offline
                            shrey
                            wrote on last edited by shrey
                            #13

                            @nebulon

                            I don't think this is a strictly "SMTP" related issue. Even for auth, the Cloudron configured email should work just fine.


                            Update:

                            Yes, confirmed that the issue is that the Typebot instance is not aware of the available SMTP settings at all.

                            Example, the following defaults in the "env.sh" have been able to get my Typebot instance going properly now:

                            export SMTP_USERNAME="$CLOUDRON_MAIL_SMTP_USERNAME"
                            export SMTP_PASSWORD="$CLOUDRON_MAIL_SMTP_PASSWORD"
                            export SMTP_HOST="$CLOUDRON_MAIL_SMTP_SERVER"
                            export SMTP_PORT="$CLOUDRON_MAIL_SMTP_PORT"
                            export NEXT_PUBLIC_SMTP_FROM="$CLOUDRON_MAIL_FROM_DISPLAY_NAME <$CLOUDRON_MAIL_FROM>"
                            export SMTP_SECURE="false"
                            export SMTP_AUTH_DISABLED="false"
                            

                            Recommendation: have the above config set by default, particularly in the cases where the admin selects "User Management by app", when installing the app.

                            girishG 1 Reply Last reply
                            0
                            • S shrey

                              @nebulon

                              I don't think this is a strictly "SMTP" related issue. Even for auth, the Cloudron configured email should work just fine.


                              Update:

                              Yes, confirmed that the issue is that the Typebot instance is not aware of the available SMTP settings at all.

                              Example, the following defaults in the "env.sh" have been able to get my Typebot instance going properly now:

                              export SMTP_USERNAME="$CLOUDRON_MAIL_SMTP_USERNAME"
                              export SMTP_PASSWORD="$CLOUDRON_MAIL_SMTP_PASSWORD"
                              export SMTP_HOST="$CLOUDRON_MAIL_SMTP_SERVER"
                              export SMTP_PORT="$CLOUDRON_MAIL_SMTP_PORT"
                              export NEXT_PUBLIC_SMTP_FROM="$CLOUDRON_MAIL_FROM_DISPLAY_NAME <$CLOUDRON_MAIL_FROM>"
                              export SMTP_SECURE="false"
                              export SMTP_AUTH_DISABLED="false"
                              

                              Recommendation: have the above config set by default, particularly in the cases where the admin selects "User Management by app", when installing the app.

                              girishG Offline
                              girishG Offline
                              girish
                              Staff
                              wrote on last edited by
                              #14

                              @shrey said in Native (email) Auth doesn't seem to work out-of-box:

                              Recommendation: have the above config set by default, particularly in the cases where the admin selects "User Management by app", when installing the app.

                              Those variables are always set already. See https://git.cloudron.io/cloudron/typebot-app/-/blob/main/start.sh?ref_type=heads#L31 . Or maybe you are suggesting that we should put this in /app/data/env.sh so that the user can see them?

                              1 Reply Last reply
                              0
                              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