Coder Social home page Coder Social logo

jamesholcombe / dash-auth-external Goto Github PK

View Code? Open in Web Editor NEW
28.0 3.0 7.0 66 KB

Plotly Dash plugin to allow authentication through 3rd party OAuth providers.

Home Page: https://pypi.org/project/dash-auth-external/

License: MIT License

Python 100.00%
python plotly dash oauth auth external oauth2 apis api

dash-auth-external's People

Contributors

alonbl avatar jamesholcombe avatar subsurfaceiodev avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

dash-auth-external's Issues

'session' cookie is too large

Hey there, thanks for the library!
We are trying to use it, but we are facing an issue with the dimensions of the session cookie:

/py39/lib/python3.9/site-packages/werkzeug/sansio/response.py:230: UserWarning:

The 'session' cookie is too large: the value was 4606 bytes but the header required 26 extra bytes. The final size was 4632 bytes but the limit is 4093 bytes. Browsers may silently ignore cookies larger than this.

What we tried:

  • auth.server.config["SESSION_TYPE"] = "filesystem"
  • Using a smaller _secret_key parameter

Do you have any insight?
Thanks :D

Outdated PYPI

Hi,
I noticed that the master branch differs from the pypi version, when using the pypi version there is a dict error that appears which is resolved in the GitHub branch. Could you update the pypi version as well?
Lastly, I keep getting a key error but as far as I can tell my token field name is correct. I am using O2Auth with openID connect.

token = auth.get_token()
File "auth.py", line 27, in get_token
raise KeyError(
KeyError: 'Header with name access_token not found in the flask request headers.'

Here is my method:

auth = DashAuthExternal(
                        external_auth_url= AUTH_URL,
                        external_token_url= TOKEN_URL,
                        client_id= CLIENT_ID,
                        with_pkce=True,
                        app_url= "http://127.0.0.1:8050",
                        redirect_suffix = "/redirect",
                        auth_suffix = "/",
                        home_suffix="/app",
                        client_secret= CLIENT_SECRET,
                        _secret_key= None,
                        auth_request_headers= None,
                        token_request_headers= None,
                        scope= ("openid profile"),
                        )

Could the error be caused by anything other than an incorrect token field name?

I also am getting this error if I try to go to /redirect after already authenticating, I am not sure if it is relevant or normal behavior after authentication.

File "/dash_auth_external/routes.py", line 76, in build_token_body
code = redirect_params["code"][0]
KeyError: 'code'

Protect page view

It would be great if it were possible to protect the view of the pages.

For example, when we used links, the application would redirect directly to the login page

Multi users and the private token field

Hey, nice library!

So the session token gets set to a private field. This is an issue in a multi-user environment since users are effectively logged in using another user's token. It also means the same user is logged in cross browser or in incognito mode.

Since most of the code is already using session cookies, is there a reason why it can't be modified to just use that?

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.