Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Google Oauth returning 404 on login #1322

Open
ShaleenAg opened this issue Sep 5, 2023 · 5 comments
Open

Google Oauth returning 404 on login #1322

ShaleenAg opened this issue Sep 5, 2023 · 5 comments
Labels

Comments

@ShaleenAg
Copy link

Describe the bug
I have added google oauth to my flower config, but whenever I try to login, it just errors out with Page not found and on checking the network tab, it seems like the login call is returning 404. I have tried using Basic auth and its working fine with it, so I am assumimg its a google issue.
Here's my config

auth_provider="flower.views.auth.GoogleAuth2LoginHandler"
auth=".*@domain.com"
oauth2_redirect_uri="https://dev.domain.com/flower/login/"
url_prefix='flower/'
#to make sure tasks stay populated after restarts
persistent=True
debug=True
oauth2_key="<redacted>.apps.googleusercontent.com"
oauth2_secret="<redacted>"

To Reproduce
Steps to reproduce the behavior:

  1. Access flower from browser
  2. login returns Error, page not found

Expected behavior
Flower should be logged in

Screenshots
If applicable, add screenshots to help explain your problem.

System information
flower -> flower:2.0.0 tornado:6.3.2 humanize:4.7.0
software -> celery:5.3.1 (emerald-rush) kombu:5.3.1 py:3.8.10
billiard:4.1.0 py-amqp:5.1.1
platform -> system:Linux arch:64bit, ELF
kernel version:5.15.0-1036-aws imp:CPython
loader -> celery.loaders.app.AppLoader
settings -> transport:amqp results:disabled

deprecated_settings: None

@ShaleenAg ShaleenAg added the bug label Sep 5, 2023
@coleshaw
Copy link

Curious if you have found a way around this or a fix?

@coleshaw
Copy link

For future reference, it seems like the route is configured without the trailing slash, so the trailing slash leads to a 404. I think you have to configure your OAuth redirect_uri to be https://dev.domain.com/flower/login -- that seems to work for me.

@EwertonDCSilv
Copy link

@ShaleenAg alguma dica para resolver o problema ?

@ShaleenAg
Copy link
Author

ShaleenAg commented Apr 27, 2024

@ShaleenAg alguma dica para resolver o problema ?

hey, no, we ended up going with Basic Auth

For future reference, it seems like the route is configured without the trailing slash, so the trailing slash leads to a 404. I think you have to configure your OAuth redirect_uri to be https://dev.domain.com/flower/login -- that seems to work for me.

Weirdly enough, Basic worked just fine, I figured it was an issue with an url redirect, I might take a look at it again and debug it

@EwertonDCSilv
Copy link

@ShaleenAg alguma dica para resolver o problema ?

hey, no, we ended up going with Basic Auth

For future reference, it seems like the route is configured without the trailing slash, so the trailing slash leads to a 404. I think you have to configure your OAuth redirect_uri to be https://dev.domain.com/flower/login -- that seems to work for me.

Weirdly enough, Basic worked just fine, I figured it was an issue with an url redirect, I might take a look at it again and debug it

Acabei optando pelo mesmo caminho: basic auth. Como estou protegendo a aplicação com uma VPN, tem algum nível de segurança, mas gostaria de utilizar o SSO do Google para prover autenticação.

Fiz o clone do projeto, tentei fazer alguns testes localmente, mas nada fazia com que o template da pagina de login fosse chamado. Algo no meio do caminho impede o redirecionamento correto da rota /login, mas como não sou especialista em Tornado, não consigo dar um veredito sobre o problema.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants