Giter Club home page Giter Club logo

Comments (5)

cldougl avatar cldougl commented on June 30, 2024 1

I think there was some fall back logic in place for when that endpoint doesn't exist: https://github.com/plotly/dash-auth/blob/master/dash_auth/plotly_auth.py#L197-L235
is that not working for you @charleyferrari ?

from dash-auth.

charleyferrari avatar charleyferrari commented on June 30, 2024

@cldougl it wasn't, for my test case it was definitely trying to access the update_or_create endpoint. In the traceback it was specifically referencing line 197, so it looks like it's not even getting past that.

from dash-auth.

chriddyp avatar chriddyp commented on June 30, 2024

@charleyferrari - could you paste the full traceback when you get a chance?

from dash-auth.

charleyferrari avatar charleyferrari commented on June 30, 2024
  File "app.py", line 17, in <module>
    auth(app)
  File "/Users/Charley/Downloads/Plotly/genentech/dash-on-premise-sample-app/auth.py", line 80, in auth
    [APP_URL, 'http://localhost:8050', 'http://127.0.0.1:8050']
  File "/Users/Charley/Downloads/Plotly/genentech/dash-on-premise-sample-app/venv/lib/python3.6/site-packages/dash_auth/plotly_auth.py", line 44, in __init__
    app_url, app_name
  File "/Users/Charley/Downloads/Plotly/genentech/dash-on-premise-sample-app/venv/lib/python3.6/site-packages/dash_auth/plotly_auth.py", line 197, in create_or_overwrite_oauth_app
    res = api_requests.post('/v2/oauth-apps/update_or_create', **request_data)
  File "/Users/Charley/Downloads/Plotly/genentech/dash-on-premise-sample-app/venv/lib/python3.6/site-packages/dash_auth/api_requests.py", line 158, in request
    **copied_kwargs
  File "/Users/Charley/Downloads/Plotly/genentech/dash-on-premise-sample-app/venv/lib/python3.6/site-packages/dash_auth/api_requests.py", line 150, in retry_request_with_logs
    resp.raise_for_status()
  File "/Users/Charley/Downloads/Plotly/genentech/dash-on-premise-sample-app/venv/lib/python3.6/site-packages/requests/models.py", line 939, in raise_for_status
    raise HTTPError(http_error_msg, response=self)
requests.exceptions.HTTPError: 405 Client Error: Method Not Allowed for url: https://plotly.charleyferrari.com/v2/oauth-apps/update_or_create

This is the traceback I got when running it locally (which should be fine, auth.py allows redirects from localhost). For some reason the same text isn't showing up in docker logs but I'll try to get it there too.

from dash-auth.

T4rk1n avatar T4rk1n commented on June 30, 2024

You got 405, but in api_request the only valid 4xx that doesn't get raised is 404. https://plotly.charleyferrari.com/v2/oauth-apps/update_or_create exists, but it's not a post call so it never get to the fallback.

from dash-auth.

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.