Hi guy, I am trying to use ory cloud and self-serv...
# ory-network
c
Hi guy, I am trying to use ory cloud and self-service ui (in a vue application). So far I've managed to setup the registration and login but I'm having problem with the password reset. When I click the reset password link from the email I receive, I get redirected to my /settings page. From there I try to call
ory.getSelfServiceSettingsFlow(flowId)
but this gives me a 401 unauthorised error. What could I be doing wrong? Is there something I need to do before starting the settings flow?
h
Could you check whether the AJAX request triggered by
getSelfServiceSettingsFlow
has any cookies in it? In chrome there is in the β€œnetwork” tab the option to look into a specific request and see the cookies, we have a bit of docs on this here: https://www.ory.sh/docs/kratos/debug/csrf#common-pitfalls
c
It has 2 request cookies:
__cflb
and
csrf_token_49d3209299a7c886030ff795867f6f2ff90868564703880c86719e7da3739e33
h
hm, those cookies should be enough to supply you with data! do you have the application running somewhere we can check?
or maybe a short screen cast? or the repository in a zip file is also fine πŸ™‚
c
Unfortunately I don't have a running application where you can check. Here is a screencast of me trying to reset my password (let me know if I should show something more! πŸ˜„) I have been using the code from this repo to work out how to setup ory in my own project: https://github.com/timalanfarrow/kratos-selfservice-ui-vue3-typescript
h
thank you so much! getting some lunch and then will check
c
No worries! Thank you for looking into it for me πŸ˜„ I am going to check back in tomorrow so won't respond until then!
r
Linking in @white-dawn-42840. Maybe he can support us too? (sorry, Timothy, to drag you into this, I just checked out your
kratos-selfservice-ui-vue3-typescript
repo and saw your note in the readme ;))
πŸ‘ 1
It would be great if - once we figured it out - can also add instructions to the repo how to use it with Ory Cloud πŸ˜‰
h
Hey lily, thank you for the screen cast, that has been super helpful. Unfortunately this is currently a limitation we have, the problem is that the link in the email is pointing to your CNAME / project URL. so the cookie we set up for this ends up on that domain (e.g. foo.projects.oryapis.com), and not your localhost domain. this is currently a limitation when using the ory proxy or one of the node integration packages. We have a fix on the roadmap for this, it will be essentially sending you a verification code via email instead of a link. The UI then just asks to input the verification code, thus preventing this URL issue. I hope this helps. If you run your app with CNAME, the URLs will be set up correctly!
c
Ah I see! That makes sense. Thank you so much for your help πŸ˜„
h
No problem, please let me know if you are able to get this working for localhost