-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Recovery and Verification Flow #42
Conversation
api/settings.go
Outdated
@@ -125,7 +137,7 @@ func HandleUpdateProfile(c *gin.Context) { | |||
return | |||
} | |||
|
|||
msg, err := settings.SubmitSettingsFlowProfileMethod(flow_cookie, session_cookie, req_body.FlowID, req_body.CsrfToken, req_body.Method, traitsinterface) | |||
msg, err := settings.SubmitSettingsFlowProfileMethod(flow_cookie, session_cookie, req_body.FlowID, req_body.CsrfToken, traitsinterface) | |||
|
|||
if err != nil { | |||
log.ErrorLogger("Kratos post settings flow failed", err) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
mention which specific flow failed, in this case profile
api/settings.go
Outdated
@@ -182,7 +194,7 @@ func HandleChangePassword(c *gin.Context) { | |||
return | |||
} | |||
|
|||
msg, err := settings.SubmitSettingsFlowPasswordMethod(flow_cookie, session_cookie, req_body.FlowID, req_body.CsrfToken, req_body.Method, req_body.Password) | |||
msg, err := settings.SubmitSettingsFlowPasswordMethod(flow_cookie, session_cookie, req_body.FlowID, req_body.CsrfToken, req_body.Password) | |||
|
|||
if err != nil { | |||
log.ErrorLogger("Kratos post settings flow failed", err) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
password
api/settings.go
Outdated
@@ -239,7 +251,7 @@ func HandleToggleTOTP(c *gin.Context) { | |||
return | |||
} | |||
|
|||
msg, err := settings.SubmitSettingsFlowTOTPMethod(flow_cookie, session_cookie, req_body.FlowID, req_body.CsrfToken, req_body.Method, req_body.TOTPCode, req_body.TOTPUnlink) | |||
msg, err := settings.SubmitSettingsFlowTOTPMethod(flow_cookie, session_cookie, req_body.FlowID, req_body.CsrfToken, req_body.TOTPCode, req_body.TOTPUnlink) | |||
|
|||
if err != nil { | |||
log.ErrorLogger("Kratos post settings flow failed", err) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
toggle totp
|
||
if err != nil { | ||
session_cookie, err1 := c.Cookie("sdslabs_session") | ||
recovery_cookie, err2 := c.Cookie("ory_kratos_session") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
maybe rename this from recovery_cookie to settings_cookie
pkg/wrapper/kratos/admin/admin.go
Outdated
"name": data.Name, | ||
"password": data.Password, | ||
"phone_number": data.PhoneNumber, | ||
"active": true, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
invite status is missing, active trait is present here
"email": req_body.Traits.Email, | ||
"totp_enabled": req_body.Traits.TOTP_Enabled, | ||
"created_at": req_body.Traits.Created_At, | ||
"role": req_body.Traits.Role, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
active trait is missing here
No description provided.