Okta flask Python App works locally but not when I host it in Azure

Hi Folks,
I cloned Okta’s GitHub flask python code and it worked fine locally. But when I host it on Azure webapp I get 400 error.

Here is my code → https://github.com/cdevairakkam7/pre_production

following is the error link I get.

https://dev-920484.okta.com/oauth2/default/v1/authorize?client_id=0oay1g2d1xlA3KWm84x6&redirect_uri=http%3A%2F%2Fuatomeletxyz.azurewebsites.net%2Foidc_callback&scope=openid+profile+email&access_type=offline&response_type=code&state={"csrf_token"%3A+"3iIABJj2Fur%2BzhNsERpQs1uHj%2BXTR8ZQ"%2C+"destination"%3A+"eyJhbGciOiJIUzUxMiJ9.Imh0dHA6Ly91YXRvbWVsZXR4eXouYXp1cmV3ZWJzaXRlcy5uZXQvbG9naW4i.2_u9qAWrI_h29D-FLWDu-kuh_DfNDg5e2icS2bv1evIYrnKhnCiFHGoPnYhah8VirUE4L50N8yFVHgv3k7Kwqw"}

Here is my okta settings

I have also added my website to trusted origin.

Please tell me what else I should do to make this work.

Thanks,
Chris

Hi @cdaniel7,

Looking at the error message, it seems like your redirect_uri is https://uatomeletxyz.azurewebsites.net/oidc_callback

But in your app settings, you’ve added https://uatomeletxyz.azurewebsites.net/authorization-code/callback
Can you add a new redirect_uri with the value https://uatomeletxyz.azurewebsites.net/oidc_callback and try if that works?

Hi @vijet, Works. Thank you.

1 Like

This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.