lchapo / dash-google-auth Goto Github PK
View Code? Open in Web Editor NEW(Deprecated) Dash Extension for Google OAuth
License: MIT License
(Deprecated) Dash Extension for Google OAuth
License: MIT License
Line 22 in 11408f5
It looks like this auth
argument is no longer valid
Is there a way to implement logging out?
Would be nice to have something similar to Plotly OAuth:
Finally, we can logout the user by clearing the cookies. To do so, you can create a logout button and insert it in the layout or use auth.logout() in a callback.
The logout button is just simply:
auth.create_logout_button(
label='Sign out',
redirect_to='https://plot.ly')]
Would be nice to handle invalid tokens, e.g. error types from oauthlib.oauth2.rfc6749.errors. As it stands, the client continues to receive 403 unauthorized until the token is deleted (session cleared).
I've been using your Google OAuth example in my Dash app but I ran into two different problems. Before your recent update, I was getting a user rate limit quota error even though my application was not making more than 500 requests every 100 seconds. After the changes, however, I don't get this error but when I checked how much I was using in terms of requests on the console, no traffic was shown. The same happens when I use your example app. Why is this happening? I guess the requests are not associated with an API console project correctly or maybe Google OAuth doesn't work as expected.
Upon moving this to my production server I'm running into the issue that I am automatically redirected to http://localhost/login/google/authorized which is not on my authorised URI list on google, rather than redirecting to https://mydomain.com/login/google/authorized.
I have looked through the code as well as the flask_dance/make_google_blueprint docs but can't seem to find where this default routing to localhost would happen.
Any advice would be greatly appreciated.
I'm getting an error: Dash() got an unexpected keyword argument 'auth'
Hello,
Ho I can get the email address of the user that was authenticated
I did all of the steps from the README.md file and replaced the variables for client ID and client secret with real values like this:
app.server.config["GOOGLE_OAUTH_CLIENT_ID"] = os.environ.get("client-id-here")
app.server.config["GOOGLE_OAUTH_CLIENT_SECRET"] = os.environ.get("client-secret-here")
However, when I ran python app.py and opened "localhost:5000" in my browser I got the following error:
401. That’s an error.
Error: invalid_client
The OAuth client was not found.
Request Details
response_type=code
client_id=None
redirect_uri=http://localhost:5000/login/google/authorized
scope=profile email
state=1kPQ9gCwR3EkGbXV5LdnPLu1TgQEpn
access_type=offline
approval_prompt=force
That’s all we know.
I put the following into the “Authorized redirect URIs” field: http://localhost:5000/login/google/authorized
When I tried out the example from the Flask Dance Guide link you have provided, I got redirected to Google login. After I logged in I tried running app.py again and this time I could access the page because I was already authenticated.
Is there a way to fix this problem? I would like to your google example in my application, thank you.
Can you please release a new version of the package on PyPI which has the latest changes?
Thanks!
How might one allow wildcard email authorization? E.g. all emails for a Google authentication domain, such as a company's staff. Is there an approach to enable all organization users, or specific email domains?
Could you consider updating the README in which it links to the flask-dance example to make and app on the google-admin-console. Also in the documentation is not clear about the redirects URLs or where to handle them when making the auth
Session does not have an attribute email, nor any user data. I just get an google oauth token.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.