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

Conversation

mikehelmick
Copy link
Contributor

Towards #1928

Proposed Changes

  • Adds webview that can be triggered on a mobile device to request a verification code

Release Note

Experimental: Adds an optional Web UI that can be launched as an embedded Webview for requesting user initiated verification codes

@mikehelmick mikehelmick requested a review from a team as a code owner April 8, 2021 21:48
@mikehelmick mikehelmick requested review from sethvargo and whaught April 8, 2021 21:48
@google-cla google-cla bot added the cla: yes Auto: added by CLA bot when all committers have signed a CLA. label Apr 8, 2021
"github.com/gorilla/sessions"
)

func stringFromSession(session *sessions.Session, key string) (string, error) {
Copy link
Contributor

Choose a reason for hiding this comment

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

See comment above, please move into pkg/controller/session.go

</main>

<script type="text/javascript">
{{if $currentRealm.RequireDate}}
Copy link
Contributor

Choose a reason for hiding this comment

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

Can we use requiredIf on the actual HTML element instead of relying on javascript here?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

the attribute is already there - eventually this will do server side validation too

dropped

return http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
ctx := r.Context()
logger := logging.FromContext(ctx).Named("userreport.HandleIndex")
logger.Infow("serving index")
Copy link
Contributor

Choose a reason for hiding this comment

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

Debug


authApp := controller.AuthorizedAppFromContext(ctx)
if authApp == nil {
controller.Unauthorized(w, r, c.h)
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
controller.Unauthorized(w, r, c.h)
controller.MissingAuthorizedApp(w, r, c.h)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

this needs to stay unauthorized for now - again error handling along this path is a TODO

return
}

nonce := controller.NonceFromContext(ctx)
Copy link
Contributor

Choose a reason for hiding this comment

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

Should you handle the case where nonce == "" ?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

this is fine for now

@mikehelmick mikehelmick enabled auto-merge (squash) April 8, 2021 23:17
@mikehelmick mikehelmick merged commit 5f95412 into google:main Apr 9, 2021
@mikehelmick mikehelmick deleted the urweb branch April 9, 2021 00:46
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Apr 10, 2021
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.

2 participants