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

cool-carpenter-11823

11/15/2021, 9:19 PM
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

jolly-jelly-9637

11/15/2021, 9:25 PM
Could you also share the response error message?
c

cool-carpenter-11823

11/16/2021, 11:59 AM
Yes ofc
j

jolly-jelly-9637

11/16/2021, 12:07 PM
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

cool-carpenter-11823

11/16/2021, 12:10 PM
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

jolly-jelly-9637

11/16/2021, 12:14 PM
message has been deleted
c

cool-carpenter-11823

11/16/2021, 12:15 PM
it looks exactly like that
I can't tell what is happening
j

jolly-jelly-9637

11/16/2021, 12:19 PM
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

cool-carpenter-11823

11/16/2021, 12:19 PM
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

jolly-jelly-9637

11/16/2021, 12:36 PM
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

cool-carpenter-11823

11/16/2021, 12:47 PM
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

jolly-jelly-9637

11/17/2021, 1:53 PM
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

cool-carpenter-11823

11/17/2021, 1:54 PM
Mmm, gonna ask in the general channel to see if anyone tried, ty!
4 Views