Can Hydra use Kratos to authenticate a user?
# talk-hydra
c
Can Hydra use Kratos to authenticate a user?
d
Yes.
c
I can't seem to find any docs / examples, can you point me to some? 🙂
d
We have a couple of examples in the community. For instance, this one
c
Thanks 🙂
d
Also, I’m working on the flask example here https://github.com/gen1us2k/ory-full-stack
c
Sweet 😄
d
You might find my example incomplete or not working, because the state is ‘it works on my machine’. I’m still fixing some redirection issues
c
Ok, I think I was expecting it to work differently which is why I didn't find what I thought I would
Just to confirm, integrating the 2 requires some glue code rather then Hydra being able to use Kratos out the box?
d
Yes. Right now it requires some glue code. However, the team working on new version of Hydra with native integration of Hydra and Kratos
c
Sounds sweet 🙂 thanks for letting me know
In your example, you have your own user table in the consent app, is this intentional? So you have a local version of a user that has the Kratos identity identifier
d
Yep. The idea was inspired by django framework. The best way to have an external authentication is to integrate it with the default user model. However, Flask works fine without it. It’s almost dead code. I think that I’ll remove it in a couple of days. The idea of user model is to cache data to show the information faster in the frontend and it’ll be good to have an user model for implementing business logic
The demo is still in work in progress state, so I change things a lot 🙂