puiterwijk / flask-oidc

OpenID Connect support for Flask
BSD 2-Clause "Simplified" License
154 stars 217 forks source link

need 401 instead of redirect #115

Open mlmarius opened 3 years ago

mlmarius commented 3 years ago

I have an Angular SPA and it's wired to receive 401 and send the user to the login page within the application. Problem is that now it gets a redirect to KeyCloak, Angular's http client attempts to follow it and I hit the Cross-Origin request problem. Is there some way to make flask-oidc return a 401 status when it checks for login instead of sending a redirect?