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


    Cloudron Forum

    • Register
    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular

    Solved Google Sign In for Surfer

    Surfer
    3
    8
    433
    Loading More Posts
    • 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
      senthilkumaran last edited by

      Does adding https://developers.google.com/identity/sign-in/web (Add Google Sign-In to Your Web App) using Javascript sound like a good idea to have a google sign in protected website on surfer?

      Is there any other way to add a google oauth to a static pages hosted on surfer?

      girish 1 Reply Last reply Reply Quote 0
      • girish
        girish Staff @senthilkumaran last edited by

        @senthilkumaran are you asking how to make a static web site which uses Google Sign-in ?

        I think OAuth always requires a server side component for verification/authorization, but @nebulon knows better.

        S 1 Reply Last reply Reply Quote 1
        • nebulon
          nebulon Staff last edited by

          I have to give that snippet a try. OAuth is not always the same and I am not sure what google does here nowadays. Just looking at the example without actually trying, it appears that the client/website obtains an access token with the user's profile. So I think this might just work like this. However since there is no session or active code on the server side to deal with this, all content protection logic has to be done on the client side, which I am then not sure what the benefit of it will be.

          1 Reply Last reply Reply Quote 1
          • S
            senthilkumaran @girish last edited by

            @girish said in Google Sign In for Surfer:

            are you asking how to make a static web site which uses Google Sign-in ?

            Yes, I was looking for that.

            @nebulon said in Google Sign In for Surfer:

            However since there is no session or active code on the server side to deal with this, all content protection logic has to be done on the client side, which I am then not sure what the benefit of it will be.

            Yes, I wondered about this too. I didn't know how the client side library will authenticate if I can have direct link to a different path.


            @nebulade - on this topic - surfer has password, and ACL authentication. What does it take to add an OAuth authentication to surfer? Is it possible? Is it desirable / or in roadmap? Your thoughts please.

            nebulon 1 Reply Last reply Reply Quote 0
            • nebulon
              nebulon Staff @senthilkumaran last edited by

              @senthilkumaran to be honest I don't think adding further auth providers is something I am planning to do. The aim for Surfer is to be a quite slim static asset server. The current auth which is there was just trivial to add, since there was already the user-interface which was Cloudron auth enabled.

              S 1 Reply Last reply Reply Quote 1
              • S
                senthilkumaran @nebulon last edited by

                @nebulon said in Google Sign In for Surfer:

                The aim for Surfer is to be a quite slim static asset server. The current auth which is there was just trivial to add, since there was already the user-interface which was Cloudron auth enabled.

                Thank you for this explanation.

                I enjoy using it, and it filled in my need for static sites. I previously I used Github pages or Neltify.
                Both had limitations and extra management that I avoid with surfer.


                A different topic, but one feedback I had with surfer design was, I had to adop token based upload, with managing multiple sites from a single local computer. The global credential was security risk, when one of my site was private.

                nebulon 1 Reply Last reply Reply Quote 0
                • nebulon
                  nebulon Staff @senthilkumaran last edited by

                  @senthilkumaran not sure if this helps in your case, but I guess you are using the surfer cli to upload and that does support --token and --server directly, so you could write small shell scripts for each site to avoid the risk of uploading to the wrong instance.

                  S 1 Reply Last reply Reply Quote 2
                  • S
                    senthilkumaran @nebulon last edited by

                    @nebulon said in Google Sign In for Surfer:

                    so you could write small shell scripts for each site to avoid the risk of uploading to the wrong instance.

                    Yes, I do the same. 🙂 Thank you.

                    1 Reply Last reply Reply Quote 0
                    • First post
                      Last post
                    Powered by NodeBB