Hello everyone. We are trying to get an account Gi...
# talk-kratos
c
Hello everyone. We are trying to get an account GitLab linking going but I keep getting a 'Method Not Allowed' even if 'oidc' is allowed as a method in the .yml file. I'm kinda noob here, but is the request supposed to have the OIDC method or I'm doing something wrong? We have already a sign in flow via GitLab working like a charm Many thanks in advance
j
Could you also share the response error message?
c
Yes ofc
j
the OIDC method is hella confusing since it should be POST… how are you submitting it? here’s an example of a link form that I generate:
c
I can make the request to use POST but then I get the error "Could not find a strategy to update your settings. Did you fill out the form correctly?
Could you show me how your request body looks when you click on submit?
j
message has been deleted
c
it looks exactly like that
I can't tell what is happening
j
are you 100% sure? 😄 if I modify my form to remove the
value="google"
attribute, I get the same error message
I had this before and it’s when the form is incorrectly generated
c
maybe it's something regarding our kratos config 🤔
although I see that in the Request tab of the request I don't have any payload being sent, I think it might stem from there the issue
I will take a look at that and return if can't solve it in a while, many many thanks!
Sorry @jolly-jelly-9637 may I ask you how are you implementing the submission? For the settings update we've been using the method
submitSelfServiceSettingsFlow
fromm the library @ory/kratos-client. The issue is that it accepts a 3rd parameter of type
SubmitSelfServiceSettingsFlowBody
which is a union one of
SubmitSelfServiceSettingsFlowWithPasswordMethodBody
and
SubmitSelfServiceSettingsFlowWithProfileMethodBody
but excludes
SubmitSelfServiceSettingsFlowWithOidcMethodBody
the one I need for the oidc method 😕
j
just using the default browser behavior - I generate a button that the user clicks on and browser submits POST urlencoded data 🙂
because the response redirects anyways, I didn’t want to bother with javascript submission
c
Ok, I updated the sdk package to the latest version and now SubmitSelfServiceSettingsFlowWithOidcMethodBody is included in SubmitSelfServiceSettingsFlowBody. I will keep going from here
Hey @jolly-jelly-9637, sorry to bother you again. I've managed to link/unlink an account (checked it via the node value returned when I request the flow, it goes from link to unlink and viceversa) But I was wondering if the settings are supposed to be automatically updated via this method because profile picture and the user full name are not being updated, for example.
Also after the link/unlink is complete, I get returned to the
ui_url
configured in the .yml but with the flow and its id as a query param added 🤔
j
I also noticed that the name/picture aren’t updated, but I didn’t really go further into it 😄 I just started using Kratos recently
c
Mmm, gonna ask in the general channel to see if anyone tried, ty!