https://www.ory.sh/ logo
#talk-kratos
Title
# talk-kratos
b

brash-iron-23043

01/19/2022, 4:29 PM
Hello, have a noob question: I have an SPA, which makes calls to my Golang API server, now i want to add authentication whith Kratos. my question is how to verify the session on the API server, do i, after login of course, send the session cookie to the api and check it in a middleware using the /sessions/whoami endpoint?
d

damp-sunset-69236

01/19/2022, 4:36 PM
Yes. Here’s an example on Python to demonstrate it https://github.com/gen1us2k/kratos_flask_example/blob/master/app/public/views.py#L18 But I just proxying all cookies and it built as an example and I don’t recommend to do this on production-ready code 🙂
b

brash-iron-23043

01/19/2022, 4:55 PM
Thanks!
4 Views