Skip to content

lchapo/dash-google-auth

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

16 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Dash Google Auth

Basic example of using Google OAuth to authenticate and view a Dash app. Uses flask dance and a modified version of Plotly's own dash auth for authentication.

Steps to try this out yourself (after installing requirements):

  1. Follow the Flask Dance Guide to create an app on the google admin console
  2. Replace the variables for app.server.config["GOOGLE_OAUTH_CLIENT_ID"] and app.server.config["GOOGLE_OAUTH_CLIENT_SECRET"] in init.py with values from the Google OAuth 2 client you should have set up in step 1
  3. Replace authorized_emails from init.py with whatever google authenticated emails you want to test with. You could also get these from a database.
  4. Run python app.py and open localhost in a browser window to try it out! Dash uses port 8050 by default, so if you haven't changed this you'd want to go here If the app loads automatically without prompting a google login, that means you're already authenticated -- try using an incogntio window in this case if you want to see the login experience for a new user.

About

(Deprecated) Dash Extension for Google OAuth

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Contributors 3

  •  
  •  
  •  

Languages