Skip to content
This repository has been archived by the owner on Jul 12, 2023. It is now read-only.

Server side password selection #658

Merged
merged 20 commits into from
Sep 25, 2020
Merged

Conversation

whaught
Copy link
Contributor

@whaught whaught commented Sep 23, 2020

Proposed Changes

  • Do new-password-selection server-side for password reset email
  • Minor code reorganization for less duplication

@google-oss-robot
Copy link

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: whaught

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@google-cla google-cla bot added the cla: yes Auto: added by CLA bot when all committers have signed a CLA. label Sep 23, 2020
@whaught whaught changed the title [WIP ]Server side password selection [WIP] Server side password selection Sep 23, 2020
Copy link
Member

@sethvargo sethvargo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looking good - let me know when you want a full review

cmd/server/assets/login/select-password.html Outdated Show resolved Hide resolved
pkg/controller/context.go Outdated Show resolved Hide resolved
@whaught whaught changed the title [WIP] Server side password selection Server side password selection Sep 24, 2020
cmd/server/assets/login/_loginscripts.html Outdated Show resolved Hide resolved
internal/firebase/error.go Outdated Show resolved Hide resolved
pkg/controller/login/select_password.go Outdated Show resolved Hide resolved
pkg/controller/login/select_password.go Outdated Show resolved Hide resolved
Copy link
Member

@sethvargo sethvargo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looking good - let me know when you want a full l-g-t-m

pkg/controller/login/select_password.go Outdated Show resolved Hide resolved
@whaught
Copy link
Contributor Author

whaught commented Sep 24, 2020

/hold

still testing that oob code verification works on the server

@whaught
Copy link
Contributor Author

whaught commented Sep 24, 2020

/hold cancel

Should all be working

cmd/server/assets/_flash.html Outdated Show resolved Hide resolved
@@ -36,6 +39,13 @@ func (err *ErrorDetails) Error() string {
return err.Err
}

func (err *ErrorDetails) Is(target error) bool {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think you should need this? It also doesn't guarantee that the error is an ErrorDetails because it could be wrapped.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have the static ones up top, but they don't match unless it's a complete match and I also specify the http code for them. I was hoping to match only on this error enum firebase gives back

}

var m map[string]string
if err := json.Unmarshal(b, &m); err == nil {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we need to handle the err case here?

Copy link
Contributor Author

@whaught whaught Sep 25, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we still want this to be understood as success if we fail to parse the body of the response

pkg/controller/login/select_password.go Outdated Show resolved Hide resolved
pkg/controller/login/select_password.go Outdated Show resolved Hide resolved
pkg/controller/login/select_password.go Outdated Show resolved Hide resolved
whaught and others added 3 commits September 25, 2020 08:08
Co-authored-by: Seth Vargo <seth@sethvargo.com>
Co-authored-by: Seth Vargo <seth@sethvargo.com>
@sethvargo
Copy link
Member

/lgtm

@google-oss-robot google-oss-robot merged commit dac30c6 into google:main Sep 25, 2020
@whaught whaught deleted the oob-code branch September 25, 2020 19:05
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Oct 6, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
cla: yes Auto: added by CLA bot when all committers have signed a CLA.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants