flask-oidc | OpenID Connect support for Flask
kandi X-RAY | flask-oidc Summary
kandi X-RAY | flask-oidc Summary
OpenID Connect support for Flask
Top functions reviewed by kandi - BETA
Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of flask-oidc
flask-oidc Key Features
flask-oidc Examples and Code Snippets
Community Discussions
Trending Discussions on flask-oidc
QUESTION
I would like a way to activate and deactivate OIDC checks using flask-oidc.
Using the @require_login
decorator is a problem as it cannot be deactivated. For instance :
ANSWER
Answered 2021-Dec-22 at 10:19Solved it.
I looked at the code of @require_login
which looks like this :
QUESTION
I'd like to build a web app using Vue for the frontend, and Python (Flask or FastAPI) for backend API calls.
Both on the frontend and the backend, I'd like to have authentication via Okta in place.
I'm able both to create a frontend (I used Okta cli for the boilerplate) with the desired protection in place, and a backend (using Flask-OIDC). However, I'm not sure how to plug those two together: is it sufficient to protect the API calls and trust that the user will be logged in through the frontend? Do I need to protect both the frontend and the backend (I strongly believe: yes)? I'm sure there is some sort of best-practice out there, but I fail to find it; would be very grateful for any pointers in the right direction.
Thank you!
...ANSWER
Answered 2021-Jul-03 at 14:52You should be fine with your approach: frontend will obtain an access_token from Okta, which you will be sending to your backend, where it should be verified appropriately.
Another architecture, which can be utilized, is establishing your own session by your backend (some sort of traditional web-client app), if you are only planning to have your front-end talking to your backend. It can be easily done with traditional authorization_code flow, where server will have both client_id and client_secret parameters. This is described in more details on Okta Developer site.
I'm not familiar with Python frameworks, so can't help with examples, but I'm sure you can find some examples online.
QUESTION
I'm trying to implement Flask-OIDC
and Keycloak
in a Flask app run inside a Gitpod
workspace.
I'm running the application and the Keycloak
server like this:
ANSWER
Answered 2021-Apr-09 at 17:12After much trial end error I've finally figured out what the problem was.
The redirect problem in the original question was solved by setting OVERWRITE_REDIRECT_URI
:
QUESTION
For some reason, PyJTW doesn't seem to work on my virtualenv on Ubuntu 16.04, but it worked fine on my local Windows machine (inside a venv too). I'm clueless, I've tried different versions, copied the exact same versions as I had on my Windows machine, and yet I still couldn't get this to work.
Installed packages:
...ANSWER
Answered 2020-Sep-30 at 05:27You shouldn’t have both the jwt and PyJWT packages installed, they have some namespace collisions. Try removing the jwt package and see if it works.
QUESTION
I configured Keycloak to authenticate the users of my client and return it's role to my application. The following JSON is the data Keycloak returns with OIDC for my user. In the data, we can clearly see that the field resource_access.test-client.roles is present.
...ANSWER
Answered 2020-Sep-13 at 13:03Claim resource_access
can be exposed in the access token
and/or id token
and/or userinfo response
. It is not clear from your problem description, where it is exposed exactly. Apparently it is in the wrong place and not where your application code is expecting that.
So fix location of the claim and you should be fine:
- lazy option: expose it everywhere (
access token
andid token
anduserinfo response
) - proper option: read documentation of used library and expose claim only to the right location (
access token
orid token
oruserinfo response
)
QUESTION
I have successfully implemented Keycloak OpenID + Python (v3.6) Flask integration using Flask-oidc.
I use below code to get user info,access_token and refresh_token
...ANSWER
Answered 2020-May-06 at 06:10I found a solution,
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install flask-oidc
No Installation instructions are available at this moment for flask-oidc.Refer to component home page for details.
Support
If you have any questions vist the community on GitHub, Stack Overflow.
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page