mirror of
https://github.com/miniflux/v2.git
synced 2025-08-26 18:21: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:
parent
62188b49f0
commit
62ef8ed57a
42 changed files with 1357 additions and 33 deletions
|
@ -70,6 +70,23 @@ func (s *Storage) UpdateAppSessionField(sessionID, field string, value any) erro
|
|||
return nil
|
||||
}
|
||||
|
||||
func (s *Storage) UpdateAppSessionObjectField(sessionID, field string, value interface{}) error {
|
||||
query := `
|
||||
UPDATE
|
||||
sessions
|
||||
SET
|
||||
data = jsonb_set(data, '{%s}', $1, true)
|
||||
WHERE
|
||||
id=$2
|
||||
`
|
||||
_, err := s.db.Exec(fmt.Sprintf(query, field), value, sessionID)
|
||||
if err != nil {
|
||||
return fmt.Errorf(`store: unable to update session field: %v`, err)
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
// AppSession returns the given session.
|
||||
func (s *Storage) AppSession(id string) (*model.Session, error) {
|
||||
var session model.Session
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue