django-okta-auth icon indicating copy to clipboard operation
django-okta-auth copied to clipboard

okta_auth2.middleware.OktaMiddleware redirecting to login page

Open silver8ack opened this issue 1 year ago • 4 comments

I'm having trouble with getting the Middleware to work.

I can successfully login via Okta and access the Django admin site, and other decorated views. However, this is while using the backend WITHOUT the okta_auth2.middleware.OktaMiddleware middleware. Once I enable okta_auth2.middleware.OktaMiddleware in MIDDLEWARE, all login attempts just redirect back to the login page.

I need some help determining where to look for issues. As I said, the auth works fine without the middleware in place, so I believe all configs are correct. Also okta auth is working 100% as users can login, groups are retrieved, etc.... For some reason, when enabling the middleware, it just doesn't work.

Without the middleware in place I need to override the admin login form to redirect to Okta, which I can do. However, I'd rather the middleware just do what it's supposed to.

Any tips would be greatly appreciated.

There are no errors anywhere, so not much to show right now.

silver8ack avatar Jun 20 '23 14:06 silver8ack