Git Product home page Git Product logo

Comments (9)

MarcSkovMadsen avatar MarcSkovMadsen commented on June 8, 2024

Good idea. Thanks

from awesome-panel.

MarcSkovMadsen avatar MarcSkovMadsen commented on June 8, 2024

Just for reference the OAuth is described here https://panel.holoviz.org/user_guide/Authentication.html. I've not tried using it yet.

from awesome-panel.

cloud-rocket avatar cloud-rocket commented on June 8, 2024

I am trying to enable OAuth2 authentication (based on Panel docs), but aside from redirecting to /login it's not working. Bokeh is still popping out the message:

INFO:bokeh.server.tornado:User authentication hooks NOT provided (default user enabled)

Can suggest where should I continue digging?
Thanks

from awesome-panel.

cloud-rocket avatar cloud-rocket commented on June 8, 2024

Ok, have some progress - you should replace:

in modifications/_server.py you should replace:

    if config.oauth_provider:
        from panel.auth import OAuthProvider

        opts["auth_provider"] = OAuthProvider()
    if oauth_provider:
        config.oauth_provider = oauth_provider

with

    if oauth_provider:
        from panel.auth import OAuthProvider
        config.oauth_provider = oauth_provider
        opts["auth_provider"] = OAuthProvider()

Otherwise, the code is meaningless

from awesome-panel.

cloud-rocket avatar cloud-rocket commented on June 8, 2024

The whole part of overriding server.py is highly problematic (in terms of panel upgrades and compatibility).... Maybe it makes sense to make the fixes more generic and request to merge them into the panel core?

from awesome-panel.

cloud-rocket avatar cloud-rocket commented on June 8, 2024

I tested the setup with Auth0 and it works!

Here is an Auth0 implementation I added - holoviz/panel#1934

I can also create a PR for my changes in your code if you want

from awesome-panel.

MarcSkovMadsen avatar MarcSkovMadsen commented on June 8, 2024

Hi @cloud-rocket

Regarding the Auth0 the best thing would to get it released in Panel. If I could get a contribution of a log in page that uses the Panel functionality, then we could showcase to Philipp that it works, is used and needed. That would help him I think get it into Panel I think. The alternative of contributing the implementation here and removing it when it's released with Panel is also fine with me. What do you think? I have close to zero experience with auth implementations - but it's very important and need to learn to do it :-)

Regarding the custom server implementation I agree it's problematic. And it is on my todo list to contribute the improvement to Panel. I will put that at the top of my todo list now. Thanks for reminding me.

from awesome-panel.

MarcSkovMadsen avatar MarcSkovMadsen commented on June 8, 2024

Hi @cloud-rocket

I've contributed a PR to Panel for the get_server function.

Please comment or upvote the FR. That might help get the improvements in. Thanks.

from awesome-panel.

cloud-rocket avatar cloud-rocket commented on June 8, 2024

Hi @cloud-rocket

I've contributed a PR to Panel for the get_server function.

Please comment or upvote the FR. That might help get the improvements in. Thanks.

Cool! I'll take a look.

Auth0 is merged to Panel also.

Thanks!

from awesome-panel.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.