-
The context is that Home Assistant is abysmal when it comes to supporting authentication methods. I was using a Password flow via a keycloak.py but that same flow doesn't quite work the way I want it to in authentik. It would work (I think) with an app password configured in authentik. I may end up going this route if I cannot figure this next part out. I'm hoping to use a simple rust app to authenticate against authentik via an API call, and I've gotten most of the way there:
I found this issue comment and I have created a flow that does authenticate a user. It works, and I can execute the flow via a simple rust app. The JWT mentioned is in a cookie, and it doesn't contain group information, and I'm unable to figure out how to get that group information via some other API call. How do I get a JWT like an oauth JWT with group information, or how do I use this newly authenticated session to ask for the groups? EDIT: Also, I can secure the flow with a group binding in authentik, which is an acceptable workaround, but I still would like to get a User Info response, so I can get an Email Address and Display Name from that login. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
I did figure this out. Took a while to find the user info endpoint. I came up with this solution: https://forge.light.kow.is/kowis-projects/hass-cli-auth-authentik It wraps the cli-auth calling a simple password flow as described in the issue comment. |
Beta Was this translation helpful? Give feedback.
I did figure this out. Took a while to find the user info endpoint.
I came up with this solution: https://forge.light.kow.is/kowis-projects/hass-cli-auth-authentik
It wraps the cli-auth calling a simple password flow as described in the issue comment.