What Single Page App example do you want to see for ORY Kratos?

Yes, that sounds great!

We would definitely publish this in some form if you get it done :slight_smile: .
Or you publish it somewhere else and we link to it in the documentation.

Thanks for sharing. To be clear: is this (going to be) the official react implementation or is this a community led one?

(in any case, super helpful)

In the example I use a simple NGINX reverse proxy so that all services live under the same origin. This prevents any CORS related problems.

The React example is just something I made and thought I’d share with the community. It seems like ORY have created their own empty official repository.

Yes, we’re working on a react and react native reference implementation :slight_smile:

1 Like

This is what I did these days

https://github.com/UkonnRa/doorknob-react

2 Likes

That looks great, I’m using svelte with SSR but this is very helpful (thank you).
Edit: do you think we could improve the UX if this was a universal app? Example:

user: press registration/login button
client: xhr request to server on custom route (domain/api/registration|login)
server: request to “/.ory/kratos/public/self-service/browser/flows/registration|login” on behalf of user in order to get redirect_url and request-id + additional checks
client: receives response from server with either an error or a url + request-id and renders the form if it’s the same site, otherwise redirects to the redirect location.

I think of going this way but seems like a lot of glue code to write. Do you see any obvious security issues with this?

1 Like