Skip to content
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

Merged
merged 18 commits into from
Feb 14, 2024
Merged

Recovery and Verification Flow #42

merged 18 commits into from
Feb 14, 2024

Conversation

Aryan51203
Copy link
Contributor

No description provided.

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)
Copy link
Contributor

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)
Copy link
Contributor

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)
Copy link
Contributor

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")
Copy link
Contributor

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

"name": data.Name,
"password": data.Password,
"phone_number": data.PhoneNumber,
"active": true,
Copy link
Contributor

@pratham1729 pratham1729 Jan 17, 2024

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,
Copy link
Contributor

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

@itsdarshankumar itsdarshankumar merged commit c877fe6 into dev Feb 14, 2024
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants