1
0
Fork 0
mirror of https://github.com/miniflux/v2.git synced 2025-08-11 17:51:01 +00:00

Add WebAuthn / Passkey integration

This is a rebase of #1618 in which @dave-atx added WebAuthn support.

Closes #1618
This commit is contained in:
Florian Rüchel 2023-11-06 04:27:35 +10:30 committed by GitHub
parent 62188b49f0
commit 62ef8ed57a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
42 changed files with 1357 additions and 33 deletions

View file

@ -120,7 +120,7 @@ func (m *middleware) handleAppSession(next http.Handler) http.Handler {
ctx = context.WithValue(ctx, request.UserThemeContextKey, session.Data.Theme)
ctx = context.WithValue(ctx, request.PocketRequestTokenContextKey, session.Data.PocketRequestToken)
ctx = context.WithValue(ctx, request.LastForceRefreshContextKey, session.Data.LastForceRefresh)
ctx = context.WithValue(ctx, request.WebAuthnDataContextKey, session.Data.WebAuthnSessionData)
next.ServeHTTP(w, r.WithContext(ctx))
})
}
@ -159,7 +159,9 @@ func (m *middleware) isPublicRoute(r *http.Request) bool {
"sharedEntry",
"healthcheck",
"offline",
"proxy":
"proxy",
"webauthnLoginBegin",
"webauthnLoginFinish":
return true
default:
return false