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. Gitea
  3. Customizing Gitea login page so the only option is Cloudron

Customizing Gitea login page so the only option is Cloudron

Scheduled Pinned Locked Moved Solved Gitea
6 Posts 2 Posters 4.0k Views 2 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.
  • B Offline
    B Offline
    bwag
    wrote on last edited by
    #1

    Per the title, I'd like to customize the Gitea login page so that the only option is "Sign in with Cloudron".

    Now, I would try to follow the instructions for Customizing Gitea, but my first problem is that Cloudron's gitea instance is already using a custom login page, and I need to modify that further. Then I assume I will drop that modified signin_inner.tmpl.tmpl file into my custom/ directory (but please correct me if I'm wrong).

    So my questions are, please,

    1. Where can I find the template for Cloudron's custom login page?
    2. Am I taking the correct/best approach to solving the problem I want to solve, i.e. have users only option be to login with Cloudron?
    1 Reply Last reply
    0
    • nebulonN Offline
      nebulonN Offline
      nebulon
      Staff
      wrote on last edited by
      #2

      You can find a custom folder in the app's data directory. If you carefully create the mentioned paths and files there, gitea will pick those up. For example to change the logo.svg you have to drop it into /app/data/custom/public/assets/img/

      The package currently does not ship the source itself, thus also not the Makefile so make generate-images will not work, but manually created versions of the logo or images will work, if the names match what the docs mention.

      1 Reply Last reply
      0
      • B Offline
        B Offline
        bwag
        wrote on last edited by
        #3

        Thank you for the reply!
        I've never used these gitea templates, so I don't know how to make a "Log in with Cloudron" button. I was hoping to just copy the source for the current page and delete the part of the page with the local login. It sounds like you are saying I need to learn how to make a "Log in with Cloudron" button myself in gitea templates.

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

          I am not sure about that login button, but I was testing only the logo basics. Generally unless an app has a solid customization (ideally via the admin UI) framework, it is not advised to do all this, as future app updates may not work well or even break the app if upstream code changes.

          1 Reply Last reply
          0
          • B Offline
            B Offline
            bwag
            wrote on last edited by
            #5

            Ok, thank you.

            1 Reply Last reply
            0
            • B Offline
              B Offline
              bwag
              wrote on last edited by bwag
              #6

              Solved
              This turned out to be easier than I expected, oops. I modified signin_inner.tmpl to only have the small OAuth2 portion of the signin page, i.e. I deleted lines 13-54 and 56-58 from that file (as it exists now), and put my version in gitea's folder custom/templates/user/auth/. As desired, it still displays "Login with cloudron", but not the main login option.

              1 Reply Last reply
              1
              • nebulonN nebulon marked this topic as a question on
              • nebulonN nebulon has marked this topic as solved on
              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