Black Lives Matter. Please consider donating to Black Girls Code today.

Enable okta login for Dash

Hi Team,

Thanks for creating this awesome framework and that too as an open source. I have created a very nice dashboard using dash and wanted to deploy it. However, I am trying to implement Okta login with dash but I am unable to achieve this. Tried exploring google but did not get any helpful article. I have stuck with this issue. Any help is highly appreciated.


Can anyone please guide on this as it is not available at internet and looks like it is not possible to integrate Okta with dash. It is very powerful tool for visualization but lack of authentication in the tool will kill its usefulness. Team, kindly guide me in the right direction.

This has come up a couple times in the forum. Ideally there would be a few people with developer access to Okta that could take a look.

My initial thought was to use flask-dance, though it seems that they removed the preset blueprint for Okta due to too much flexibility in the config. There is an example app, though, here:

How to use flask-dance? I used the following repo to set up oauth2 in my dash apps for Google:

You would need to change the auth blueprint for your okta instance. Hope that helps –

I was successful in integrating Dash with Okta by using dash-okta-auth . It does require flask dance but, while they say that they are not supporting the okta blueprint, it still seems to download as part of their package. Two quick tips:

  1. The auth = ‘auth’ statement can be commented out since it will throw an error

app = Dash(
    #  auth='auth',
  1. I had a good bit of difficulty with a ‘404 BAD REQUEST’ error from Okta. I was able to overcome this by copying the text behind the redirect_uri parameter in the url that appears with the error screen and then (after re-inserting the colon and slash etc.) placing that text into the ‘Login redirect URIs’ field on your Okta application. So for example, http%3A%2F%2Flocalhost%3A8050%2Flogin%2Fokta%2Fauthorized becomes http://localhost/8050/login/okta/authorized .

This is kind of hard to explain but if you run into trouble let me know and I will try to help.