Hello, have a noob question: I have an SPA, which ...
# talk-kratos
b
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
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
Thanks!